Public Sub CleanCloseForm(FormName As String)
Close form, turning echo off before the close and re-enabling it afterwards to avoid flickering.
'Safe' Functions
Wraps various built-in functions, suppressing annoying error messages and handling them more gracefully. This allows use of the functions without the distraction or ON ERROR RESUME NEXT blocks.
Close form, turning echo off before the close and re-enabling it afterwards to avoid flickering.
Hide the navigation bar in Access 2007
Is the preference setting 'Confirm Record Changes' on ?
Open report, fail silently if error occur.
See DoCmd.OpenForm for details on the parameters.
Open report, fail silently if '2501 - OpenReport action was canceled' error occurs. This error occurs if you hit the cancel button.
See DoCmd.OpenReport for details on the parameters.
wraps the VBA 'Dir' function, suppressing any error message and returning an empty string if there is an error. While calling Dir with a nonexistent path does not cause an error, calling it with a nonexistent drive letter does.
See Dir function for use.
This is only for the initial call: if getting the next path use Dir().
Delete file, ignoring errors (does not exist, locked, etc).
Returns the error number if the file existed but could not be deleted
wraps the VBA 'Shell' function, suppressing any error message.
See Shell function for use.
As the shell command is asynchronous, put the command in a batch file and generate a flag file at completion so we can wait for it. Assumes hourglass is set prior to function entry.