var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: suppress error messages
How do you suppress Microsoft Access error messages?
For instance, when user enters date format incorrectly I would like my own msgbox to appear instead of access. But I don't know how to suppress MS A2K's error msg.
At which event do you suggest is the best place to put it?
try to get user entry mistakes before an error is noticed by Access: _beforeupdate is a good place to start, input masks help too.
if on error is to help you display your own msg you need to be in code. some examples - maybe you have an update button that's going to post the user's edits somewhere:
private sub update_click()
on error goto err_update_click1
'first part of your code which might trigger an error of somesort
on error goto err_update_click2
'second part of your code which might trigger an error of somesort
on error goto err_update_click3
'third part of your code which might trigger an error of somesort
'etc for other error-risk areas of your code
'your working code is above this line: rest is exit & error handling
'maybe some tidy-up code if you need it
msgbox "something went wrong in the first part"
resume next 'will resume execution in line after error line
msgbox "something went wrong in the second part"
'find a way to fix the error here, then
resume 'will resume execution at the (now fixed) error line
msgbox "something went wrong in the third part"
resume exit_update_click 'will resume execution at your exit sequence
choose which resume to use carefully: plain resume goes into an infinite loop if your fix doesn't work.