Msg Box Code

  • Thread starter Thread starter Uschi via AccessMonster.com
  • Start date Start date
U

Uschi via AccessMonster.com

On my form I need to make certain that the user types in the correct number
into the text box CertificateNo. I need a message box to pop up with the
message "Are you sure you have entered the correct Certificate Number?" when
the user has entered a number.
Can anyone write the code for me?
 
On my form I need to make certain that the user types in the correct number
into the text box CertificateNo. I need a message box to pop up with the
message "Are you sure you have entered the correct Certificate Number?" when
the user has entered a number.
Can anyone write the code for me?

Code the [CertificateNo] BeforeUpdate event:

If MsgBox("Did you enter the correct number?",vbYesNo) = vbYes Then
Else
Cancel = True
End If

If Yes is clicked the value is saved.
If No is clicked, the cursor is returned to the [CertificateNo] field
for re-entry.
 
Back
Top