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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Querying on Forms

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have a problem in Access query (SQL) which use fields from the Forms that are a part of my database. I have various forms which have some common fields and values of most of them are based on a query.

In the query, while mentioning the form name, Me!field_name
does not work, and i have to write Form_name!field_name which means A DIFFERENT QUERY FORM EVERY FORM, inspite of the fact that same logic is being used for all the form fields.

Can I get away with this? How??
 
Can't get away with it, you have to specify using [Forms]![MyFormName]![MyControlName]. You may want to look into the QueryDef function which allows you to modify a query through code, then you could change the criteria on an as needed basis.

HTH Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top