Making a MsgBox appear after a blank record is shown?

looneytunes

Registered User.
Local time
Today, 18:41
Joined
Feb 9, 2005
Messages
31
hi,
i have a form, which when opened, gives me a blank record. which is what i asked it to do in the OnOpen property. however, i also need a msg box to popup - but after the form has been opened. i tried placing both pieces of 'code' into the OnOpen property, however, the popup displays first, then the form opens.

so currently i have:

Private Sub Form_Load()
Select Case MsgBox("Please select the Registration Number from the drop down menu or type it in", vbOKOnly, "Select Registration Number")

End Select
End Sub
--------------------------------------------------------------------------
Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acNewRec

End Sub
--------------------------------------------------------------------------

but it does the same thing. so, is there a way to make the msg box appear after the form opens with a blank record?
thank you in advance :D
 
Don't put any code in the Form_Open event. Put the GoToRecord method in the same event as the MsgBox keyword.
 
thanks for your reply.
i have put both pieces of code into the OnLoad event (i hope this is what you meant) but it still shows the message box before opening the form.
here is the code:
---------------------------------------
Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRec

Select Case MsgBox("Please select the Registration Number from the drop down menu or type it in", vbOKOnly, "Select Registration Number")

End Select
End Sub
-------------------------------------------
Can you spot any errors?
thank you
 
i would greatly appreciate a reply. if u need more info. pls let me know. thank you
 

Users who are viewing this thread

Back
Top Bottom