Question on queries with no data

hammerva

Registered User.
Local time
Today, 23:07
Joined
Dec 19, 2000
Messages
102
Hello again how are you.

I created a query that produced the sum of a particular field under a certain date range. It is only a one field query. Sometimes the query will be produce no records (depending on the date range entered). But instead of a 0 in the field I can't a blank query (which I expect). I want to use the field in this query for a report but if there is no data then the field will be blank on the report

Is there a way to populate a field in a query with a 0 or blank if no data was found? That way I can at least show something on the report. Or is there something I can do in the report. I tried create a text box but didn't have much success. Kept getting errors.

Any help would be appreciated. Thanks
 
Just a thought.

Assuming that you are firing this Report off by say a button or some other event that you can get into, I would try something like this.

Dim vCheck

vCheck = DLookup("[FieldName]","query name")
If IsNull(vCheck) then
Msgbox "Sorry no report possible do to null value in report"
Else
Print your report process here
End if
 

Users who are viewing this thread

Back
Top Bottom