Multiple queries vs. one query

  • Thread starter shannaj via AccessMonster.com
  • Start date
S

shannaj via AccessMonster.com

I need help. Right now I use three queries with certain criteria in each one
to access three versions of the same format of form. It is kind of a
nuisance right now because if I make a change to the form. I have to change
all three forms as well and now I am using a subform in this as well, which
means I am going to have to be 3 copies as well because of the macro I am
using. What I would like to do is to use one query to access one form to
ease the nuisance of having to change all three forms. I have tried to paste
my criteria on 3 rows in the query, this works fine exept I get the perameter
messages. Is there any way to get away from having perameter messages, or
another way to get this done?
 
A

Allen Browne

Where are these queries headed?

For many situations, you can provide a form with unbound controls where the
user can enter the critiera they wish to use. You then build a filter string
from the controls they used, and apply it as the Fitler for your form, or
the WhereCondition for OpenReport.

Here's a sample database to pull apart and see how this works:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html
 
S

shannaj via AccessMonster.com

Thank you so much, it looks like this is exactly what I am looking for. One
of the problems I am finding is in my code for cmdFilter Click. My first
code is giving me a Compile error: Variable not defined for my strWhere =
strWhere. Is there something I am doing wrong?

Allen said:
Where are these queries headed?

For many situations, you can provide a form with unbound controls where the
user can enter the critiera they wish to use. You then build a filter string
from the controls they used, and apply it as the Fitler for your form, or
the WhereCondition for OpenReport.

Here's a sample database to pull apart and see how this works:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html
I need help. Right now I use three queries with certain criteria in each
one
[quoted text clipped - 11 lines]
messages. Is there any way to get away from having perameter messages, or
another way to get this done?
 
S

shannaj via AccessMonster.com

Nevermind, thank you so much, I figured out what I was doing wrong.
Thank you so much, it looks like this is exactly what I am looking for. One
of the problems I am finding is in my code for cmdFilter Click. My first
code is giving me a Compile error: Variable not defined for my strWhere =
strWhere. Is there something I am doing wrong?
Where are these queries headed?
[quoted text clipped - 13 lines]
 

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

Top