Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Between Dates From a Form

Status
Not open for further replies.

rutkus

Programmer
Aug 28, 2001
41
US
hey,

i have a form(with 2 unbound textboxes asking for beg and end dates) that sets the criteria for a crosstab query(which defines a report).

In the query i setup a new field with the same field name as the column heading, from there i added a WHERE clause and in the criteria i typed this:

Between [Forms]![ReportParameters]![BegDate] And [Forms]![ReportParameters]![EndDate]

this is the error i got:

The Microsoft Jet Database Engine does not recognize '[Forms]![ReportParameters]![BegDate]' as a valid field name or expression

I was thinking maybe i have to open the form before the query opens, so that itll find the textboxes, but i can also see how that wouldnt be necessary (i have default values already set, so it should find a date range). Then i also thought maybe i have to make a table for the textboxes, so that the query can get the info off that, but that also seems a bit unnecessary.

so if anyone has encountered this and knows what i should be doing, any and all help would be greatly appreciated.

thanks
Omar Qureshy
HI-Tek
 
Not to be rude, but do you have a form named ReportParameters??? Joe Miller
joe.miller@flotech.net
 
This is a wierd thing with crosstab queries. I remember seeing something about it awhile ago, but I don't remember where. What you have to do is this:

Choose Query->Parameters from the menu. For each of the parameters that is giving you the error, you need to stick the full name in the left hand side of the column and the data type in the right hand side.

Once you do this, you will no longer get the error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top