Using a Form to create Reports

  • Thread starter That Crazy Hockey Dood
  • Start date
T

That Crazy Hockey Dood

Good Day..

I am attempting to use a form to create a data specific report from my data
table. I appear to have a problem with the query that is running from this
command though. I am able to retrieve the data when I fill out the entire
form but the report chokes when an field has no entered data. I am 99.9%
sure it is an issue with my query. Here is what I have in SQL:

SELECT Exception.Date, Exception.[Thru Date], Exception.Name,
Exception.[Event Type], Exception.FMLA
FROM [Exception]

WHERE (((Exception.Name)=[Forms]![Report Generator]![Name] Or
(Exception.Name) Is Null) AND ((Exception.[Event Type])=[Forms]![Report
Generator]![Event] Or (Exception.[Event Type]) Is Null) AND
((Exception.FMLA)=[Forms]![Report Generator]![FMLA] Or (Exception.FMLA) Is
Null))

GROUP BY Exception.Date, Exception.[Thru Date], Exception.Name,
Exception.[Event Type], Exception.FMLA
HAVING (((Exception.Date) Between [Date] And [Thru Date]) AND
((Exception.[Thru Date]) Between [Date] And [Thru Date]));

My goal is to allow the user to specify the data they want to see in the
report. However, I would like for the report to work even when a value is
not found since we may wish to run a report based upon an event without the
need to limit the data down to specifics.

Thank you in advance for your help.

Jim
 

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

Top