Solved The Microsoft Access database engine does not recognize <Name> as a valid field name or expression.

drifter96

New member
Local time
Today, 13:58
Joined
Aug 30, 2021
Messages
13
This might be difficult to explain, but I will do my best.

I have a user form that has two date fields on it, [txtFromWeekly] and [txtToWeekly]. The user enters the two dates, clicks a button and it runs a query. In that query it reads the two fields using the following criteria, >=[Forms]![frmReprint]![txtFromWeekly] And <=[Forms]![frmReprint]![txtToWeekly], on the following field [DateImported], to filter data from a table. That query works perfectly.

From that query, another query is run, that adds a counter, some fields are combined and so on, but the [DateImported] isn't used ay all in this query. This query works perfectly.

Then finally, a Crosstab query is created from the second query, but when that one is run is when I get the following error message, The Microsoft Access database engine does not recognize '[Forms]![frmReprint]![txtFromWeekly]' as a valid field name or expression.

Any ideas how I could fix this would be greatly appreciated.
 
Open the crosstab in design view, click on the Parameters button on the Design ribbon and add the two parameters ([Forms]![frmReprint]![txtFromWeekly] and [Forms]![frmReprint]![txtToWeekly]) and select Date with Time for the data type fro both. Save the query and open it and you should be fine.
Cheers,
 
Open the crosstab in design view, click on the Parameters button on the Design ribbon and add the two parameters ([Forms]![frmReprint]![txtFromWeekly] and [Forms]![frmReprint]![txtToWeekly]) and select Date with Time for the data type fro both. Save the query and open it and you should be fine.
Cheers,
Thank you so much! That did the trick. I never knew that was a thing.
 

Users who are viewing this thread

Back
Top Bottom