H
hobbit2612 via AccessMonster.com
Hi, I wonder whether someone may be able to help me please.
Thanks to John Spencer from this forum I have managed to track changes I make
in my database tables.
I now want to take the updated fields and put them in a report which, I'm
fairly comfortable with. However, the problem I'm having is with the query.
There are a good number of 'DateFieldChanged' fields in my query and I would
like to be able to use a date parameter to extract the data I want in my
report but with only having to type the dates in once. Please note that some
of the fields will have a 'DateofChange' entry, others won't.
I thought the best way to do this was to create a pop up form with
'StartDate' and 'EndDate' text boxes and a button to run the query.
In the query I have included the statement:
Select * From MyTable Where [StartDate] >= Forms![MyForm]![StartDate] And
[EndDate] <= Forms![MyForm]![EndDate]
The problem is that when I type the dates in on the form and click the button
I am asked to type the dates in again within a dialog box that says 'Enter
Parameter Value'. I'm assuming this is coming from the query. I type in the
dates and click ok. But the query extracts all the data even though it
doesn't fall within the date parameters.
If I go directly into the query and try it the same thing happens.
Could someone please point me in the right direction.
Many thanks
Chris
Thanks to John Spencer from this forum I have managed to track changes I make
in my database tables.
I now want to take the updated fields and put them in a report which, I'm
fairly comfortable with. However, the problem I'm having is with the query.
There are a good number of 'DateFieldChanged' fields in my query and I would
like to be able to use a date parameter to extract the data I want in my
report but with only having to type the dates in once. Please note that some
of the fields will have a 'DateofChange' entry, others won't.
I thought the best way to do this was to create a pop up form with
'StartDate' and 'EndDate' text boxes and a button to run the query.
In the query I have included the statement:
Select * From MyTable Where [StartDate] >= Forms![MyForm]![StartDate] And
[EndDate] <= Forms![MyForm]![EndDate]
The problem is that when I type the dates in on the form and click the button
I am asked to type the dates in again within a dialog box that says 'Enter
Parameter Value'. I'm assuming this is coming from the query. I type in the
dates and click ok. But the query extracts all the data even though it
doesn't fall within the date parameters.
If I go directly into the query and try it the same thing happens.
Could someone please point me in the right direction.
Many thanks
Chris