DoCmd.DoMenuItem?

Greyowlsl

Mlak Mlak
Local time
Today, 15:47
Joined
Oct 4, 2006
Messages
206
Hi,

I have a form which has a serial number text box. There is also a button that opens a search for that text box:
Code:
Me.txtSerialNumber.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
However i have an after update procedure:
Code:
Private Sub txtSerialNumber_AfterUpdate()

If IsNull(Me.Text90) Or Me.Text90 = "" Then
ElseIf IsNull(Me.txtAuthorizationNumber) Or Me.txtAuthorizationNumber = "" Then MsgBox ("RMA Entered!")
End If

End Sub
Now (im assuming) the after update procedure is not working because the Search menu is still open (until manually closed).

Is this my problem, and what can i do.

Thanks for your time.
Leon
 
1. Don't use the old DoMenuItem commands. Use DoCmd.RunCommand acCmdxxxxxx instead (where xxxxxx is the name of the command).

2. Also, your IF statement is not optimal to begin with. What is it supposed to ultimately achieve?
 

Users who are viewing this thread

Back
Top Bottom