Chris,
Thanks for the response.
Query runs fine in the Sql view because it prompts for date which I
enter and get the
desired output from the undermentioned query.
SELECT Production.Production
FROM Production
WHERE (((Production.Date)=Forms!ReportForm!reportDate) And
((Production.ShiftName)="Shift1"));
However, I need to pass this value from a form(text field) to this
query and once I click
on the show report button in the form, form closes and report pops up
with the results base on above query.
Actually, the application that I am trying to develop will need much
more complicated query
than the one shown above, but I have to go step by step.
Thanks
Mike
Chris Moore <cdmwebs@no_spam.hotmail.com> wrote in message news:<40F5CFBF.30307@no_spam.hotmail.com>...
I'm not sure what the problem is, but if the query runs fine then the
report should also. Are you closing the form when you run the report?
If so, is hiding the form before opening the report an option? Will you
be using the form again?
Mike wrote:
I have to pass a date from a form to a report query. I have written a
query that works fine when I execute from SQL view, But I dont know
how to pass a value from the form to this query.
SELECT Production.Production
FROM Production
WHERE (((Production.Date)=Forms!ReportForm!reportDate) And
((Production.ShiftName)="Shift1"));
I search so many mails in this group, but I didn't find a simple
answer to my problem.
Thanks
Mike