Private Sub Form_BeforeUpdate(Cancel As Integer) If IsNull(Me.text0) Then MsgBox "complete data" Cancel = True End If End Sub Why the msgbox above appear to me twice? Oclick the message box 2 time until disappear what is the reason thanks
Apr 12 2009, 04:45 PM
No idea, based on your posted code, unless the control is corrupted. It runs as expected when I recreate your scenario in v2003. You might delete the textbox and BeforeUpdate event and recreate them.
Apr 12 2009, 07:09 PM
G’day Aam. o you mean you get one message box when you try to move to a new record and another message box when you try to close the Form? Regards, Chris.
Apr 12 2009, 11:24 PM
Is there any other VBA code on the form?
Apr 13 2009, 12:41 AM
missinglinq ChrisO HiTechCoach Thanks all HiTechCoach Is there any other VBA code on the form? Ofind the trick you give the idea i duplicate the code here is the duplication DoCmd.RunCommand acCmdSaveRecord DoCmd.GoToRecord , , acNewRec the message appear twice for the above reason
Apr 13 2009, 02:11 AM
if find answer for duplicating message by help HiTechCoach but Now If i have the above code and this message appear to me when closing the form how can i prevent this message from appear? i'm using this code to close the form command_1_click docmd.close end sub
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.