michaelo
06-11-2009, 02:02 PM
Hi I am new to access 2003 and need some help with a query I am working on. I need to know if it is possible to refer to a value in a table when writing the criteria line for my query. The criteria I am trying to write is between [table name]![value1]and table name]![value2]. I am trying to produce a date range from another table. This query is part of a three query macro and each query needs the date range in it.
Thanks,
Hi I am new to access 2003 and need some help with a query I am working on. I need to know if it is possible to refer to a value in a table when writing the criteria line for my query. The criteria I am trying to write is between [table name]![value1]and table name]![value2]. I am trying to produce a date range from another table. This query is part of a three query macro and each query needs the date range in it.
Thanks,
In the Criteria cell put:
Between forms!myformname!mycontrolname1 And forms!myformname!mycontrolname2
where mycontrolname1 and 2 are the 2 dates. (Note: Use the name of the ctrl, not the fld name)
michaelo
06-12-2009, 05:02 AM
I don't want to type in the date. I want the query to read the date from the table automatically.
namliam
06-12-2009, 05:36 AM
between [table name]![value1]and [table name]![value2]
Yes this is quite possible and exactly how you must do it... the [table name] table must though also appear in the From part of the query....
Welcome to AWF and Good luck!