Object Required

S

Stefan

I get Object Required error message

I have a command button with this code

Dim stDocName As String
stDocName = "rpt Average # Patient Visits"

If Me![FromDate] Is Null Then

DoCmd.OpenReport stDocName, acPreview
End If


FromDate(is causing the error) is an unbound field on the
form which I am using to filter.

I have tried to go to tools references to make sure I have
the right object libary selected.

Any Ideas

Thanks in advance
 
K

Ken Snell

Change
If Me![FromDate] Is Null Then

to
If IsNull(Me![FromDate]) Then

You need to use the IsNull function for your situation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top