Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object Requred Error. Help!

Status
Not open for further replies.

dmon000

Technical User
Sep 9, 2003
79
US
The first If line executes fine. The second, "ElseIf Me.AP1INITIALS Is Null Then" returns the error message.
Any ideas why?
Thanks!!

Private Sub cmdApprove_1_Click()
If Not Me.AP1Check Then
MsgBox "Please check the Operations checkbox", vbSystemModal: Me.AP1Check.SetFocus: GoTo Incomplete
ElseIf Me.AP1INITIALS Is Null Then
MsgBox "Please enter Your Initials", vbSystemModal: Me.AP1INITIALS.SetFocus: GoTo Incomplete
ElseIf Me.AP1DATE Is Null Then MsgBox "Please enter the date of Approval", vbSystemModal: Me.AP1DATE.SetFocus: GoTo Incomplete
End If
emailBody = "ECN " & txtECN_NO & " has been approved by the Operations Manager. Please review."
recipients = Split(GET_RECIP("TEST"))
SndMsg recipients, "ECN Approval Notification for ECN number" & Me.ECN_NO, emailBody, False
fNP100a_NP_sub.SetFocus
cmdApprove_1.Enabled = False

Incomplete:
End Sub
 
What is Me.AP1INITIALS?

If it's a textbox try something like:
Code:
ElseIf Me.AP1INITIALS = ""
Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
I recommend:
Code:
ElseIf Nz(Me.AP1INITIALS,"") = "" Then

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top