G
Guest
Hi all,
Having a procedure to display custom errormessages I would like to place
this within a function, so I do not have write all vb over and over again.
So within procedure of the form I declared strMessage, strBoxType,
strBoxHeader a string.
Using this within the same procedure it functions but I want to call a
function like
goNextRecord having an errorstatement. fe
button1_click()
strBoxType = vbCritical
strBoxHeader = "Box Header"
strMessage = "ERROR"
GoNextRecord
end sub
Function GoNextRecord()
On Error GoTo Err_GoNextRecord
DoCmd.GoToRecord , , acNext
Exit Function
Err_GoNextRecord:
MsgBox strMessage, strBoxType, strBoxHeader
Exit Function
End Function
so this function can handle the routine for all forms within my db.
unfortunately the function does not display the string as they are
(according the debugger) empty.
Can someone please help me out?
Greetings,
Harry
Having a procedure to display custom errormessages I would like to place
this within a function, so I do not have write all vb over and over again.
So within procedure of the form I declared strMessage, strBoxType,
strBoxHeader a string.
Using this within the same procedure it functions but I want to call a
function like
goNextRecord having an errorstatement. fe
button1_click()
strBoxType = vbCritical
strBoxHeader = "Box Header"
strMessage = "ERROR"
GoNextRecord
end sub
Function GoNextRecord()
On Error GoTo Err_GoNextRecord
DoCmd.GoToRecord , , acNext
Exit Function
Err_GoNextRecord:
MsgBox strMessage, strBoxType, strBoxHeader
Exit Function
End Function
so this function can handle the routine for all forms within my db.
unfortunately the function does not display the string as they are
(according the debugger) empty.
Can someone please help me out?
Greetings,
Harry