query from form

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

Hello i have query which runs from a field in a form! in the query i have
this criteria
[FORMS]![FORM11]![CONSULTANT] in the consultant field

which works fine! however i do i get the query top pick up ALL (in this case
) CONSULTANT using this method!

thanks in advance
 
You can copy the query and get rid of the criteria or you can build both
queries on the fly in VBA, adding the criteria when needed.

Or, you might want to look at:
http://www.mvps.org/access/queries/qry0001.htm which will give you all
consultants when the consultant field is empty. By using this method, you
can let your criteria point to an invisible field on your form. Before
running the query you give that invisible field either the value of the
consultant field (giving you only the current consultant) or make it null
(giving you all consultants).

FK
 
Brilliant !!1 works great! --
Thanks Steve


frank knuckles said:
You can copy the query and get rid of the criteria or you can build both
queries on the fly in VBA, adding the criteria when needed.

Or, you might want to look at:
http://www.mvps.org/access/queries/qry0001.htm which will give you all
consultants when the consultant field is empty. By using this method, you
can let your criteria point to an invisible field on your form. Before
running the query you give that invisible field either the value of the
consultant field (giving you only the current consultant) or make it null
(giving you all consultants).

FK

Steve said:
Hello i have query which runs from a field in a form! in the query i have
this criteria
[FORMS]![FORM11]![CONSULTANT] in the consultant field

which works fine! however i do i get the query top pick up ALL (in this
case
) CONSULTANT using this method!

thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top