View Single Post
  #3  
Old July 26th, 2007, 04:13 PM posted to microsoft.public.access.reports
Rockn
external usenet poster
 
Posts: 48
Default Report critera - Date Range

The controls are used to set the criteria for the DoCmd.OpenReport where
criteria. It is only when either of the fields are empty that I get the
error.

The date fields on the form.

"Duane Hookom" wrote in message
...
How are you using the controls for criteria: in the Where Condition or
hard-coded in the query?

You stated "when the date fields are empty". Do you mean the date
"controls"
on the form or the date "fields" in the records?
--
Duane Hookom
Microsoft Access MVP


"Rockn" wrote:

I have an unbound form that is used to set the criteria for a report. I
have
date fields for a start date and an end date. I want the report to return
all records when the date fields are empty and cannot get it to work in
VBA.
I have it working when the date fields are populated, but when they are
emty
I get the error "Invalid Use of Null"

I have tried a conditional statement to test for Null in both fields, but
I
get the same results.

Seems like it should be straight forward, but I am probably looking at it
too hard.

Thanks