MsgBox

Did you put the FormattedMsgBox function in a module as I said to do ?

The Dim statement isn't correct

For info, i also wouldn't use the Form before update procedure for this
Better to use a command button ... or possibly the form close event
 
Did you put the FormattedMsgBox function in a module as I said to do ?

The Dim statement isn't correct

For info, i also wouldn't use the Form before update procedure for this
Better to use a command button ... or possibly the form close event

Hi Colin,

Sorry my mistake, I missed out the module in haste.

Thanks for the tip added the code to a Command- SaveBtn Instead of 'before update' event procedure.

I have got it working without the error handling as I was getting a Complie error: Variable not defined on;
StrProc "formattedMsgBox"

Thank you for your help! :)

Simone.
 
I did a YouTube video about message boxes a while back:- https://youtu.be/f1tDWoKOkek Also available is the Google presentation which is discussed in the video.

Hi Tony,

Great Video, very helpful will check out your other video's too.

Thanks, Simone
 
Ah sorry

To restore the error handling (recommended):
a) either change the code in the Err_Handler section to:
MsgBox "Error " & Err.Number & " in FormattedMsgBox procedure : " & vbNewLine & " - " & Err.Description b) or define strProc as a string


If you do b), I would suggest defining strProc as a global variable in a module so its available throughout the database

i.e. Global strProc As String
 
Ah sorry

To restore the error handling (recommended):
a) either change the code in the Err_Handler section to:
MsgBox "Error " & Err.Number & " in FormattedMsgBox procedure : " & vbNewLine & " - " & Err.Description b) or define strProc as a string


If you do b), I would suggest defining strProc as a global variable in a module so its available throughout the database

i.e. Global strProc As String

Hi Colin,

Thank you,
a) worked no problem error handling back on track!
b) came back with compile error: Invalid attribute in Sub or Function; 'Global'

Thanks,

Simone.
 

Users who are viewing this thread

Back
Top Bottom