By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,514 Members | 1,308 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,514 IT Pros & Developers. It's quick & easy.

Opening a MsgBox in a form

P: 7
Hi

Please help..

I have a form updating a table. When data is entered into a Combo box, I would like to use the BeforeUpdate or AfterUpdate (??) to verify if this information already exists in "another" table..not linked to the table the form is updating.

If the above it true I want a MsgBox to display a warnig message. On cancelation of the MsgBox the data must still be accepted as vaild.

I can not get this right...any comments???
Oct 19 '06 #1
Share this Question
Share on Google+
2 Replies


NeoPa
Expert Mod 15k+
P: 31,441
Using a MsgBox will not effect the outcome of the data unless you program Cancel=True in response.
In other words, you shouldn't need to worry about it unless you put in code yourself.

It's hard to be more specific in the absence of more details but I hope this helps.
Oct 19 '06 #2

MMcCarthy
Expert Mod 10K+
P: 14,534
Sub temp()
MsgBox "And now ...", vbOKCancel + vbExclamation
MsgBox "OK"
End Sub

If you run the above as a test you will see that cancelling the msgbox doesn't do anything unless you take the resulting integer returned and do something with it like below.

Sub temp()
Dim rslt As Integer
rslt = MsgBox("And now ...", vbOKCancel + vbExclamation)
If vbOK = -1 Then
MsgBox "OK"
End If

End Sub


Hi

Please help..

I have a form updating a table. When data is entered into a Combo box, I would like to use the BeforeUpdate or AfterUpdate (??) to verify if this information already exists in "another" table..not linked to the table the form is updating.

If the above it true I want a MsgBox to display a warnig message. On cancelation of the MsgBox the data must still be accepted as vaild.

I can not get this right...any comments???
Oct 20 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.