• Status: Solved
  • Priority: High
  • Security: Public
  • Views: 42
  • Last Modified:

Access VBA Object Required Error

I'm getting an object required error message on the following line:

If Me.Call_End_Time Is Not Null Then



Private Sub Form_Open(Cancel As Integer)
If Me.Call_End_Time Is Not Null Then
Me.Call_End_Time.Locked = True
Else
Me.Call_End_Time.Locked = False
End If

End Sub

Open in new window

0
shieldsco
Asked:
shieldsco
  • 2
1 Solution
 
PatHartmanCommented:
"Is Not Null" is an SQL expression.  In VBA, you would use the IsNull() function

Private Sub Form_Open(Cancel As Integer)
If Not IsNull(Me.Call_End_Time) Then
    Me.Call_End_Time.Locked = True
Else
    Me.Call_End_Time.Locked = False
End If
End Sub

Open in new window

0
 
shieldscoAuthor Commented:
Thanks
0
 
PatHartmanCommented:
You're welcome.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now