468,278 Members | 1,563 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,278 developers. It's quick & easy.

Optional Search

Hello all,

I've just hit a brick wall. What I have is a form with a heap of tick
boxs and text box on it and down the bottom a subform with shows the
results. i also have a search button down the buttom as well.

Now what I'd like to be able to do is for the user to select and fill
as many fields as they see fit then hit search and it will show the
results in the subform down the buttom that comply to one or all of the
search critea.

The trouble i'm having is with the whole optional thing in the query..
the few thing i have tryed have just shown me null values.

If someone could help me it would be great.

Cheers

Mar 27 '06 #1
3 1448
Ok i don't know what the hell happened with this post... doubled up for
some reason.. sorry everyone

Mar 27 '06 #2
Wo********@hotmail.com wrote in
news:11**********************@i40g2000cwc.googlegr oups.com:
Hello all,

I've just hit a brick wall. What I have is a form with a heap
of tick boxs and text box on it and down the bottom a subform
with shows the results. i also have a search button down the
buttom as well.

Now what I'd like to be able to do is for the user to select
and fill as many fields as they see fit then hit search and it
will show the results in the subform down the buttom that
comply to one or all of the search critea.

The trouble i'm having is with the whole optional thing in the
query.. the few thing i have tryed have just shown me null
values.

If someone could help me it would be great.

Cheers

Since we don't know what you've tried, it's kinda difficult to
suggest alternatives.

I've found that the best way is to have the query return all
records and use the filter and filterOn properties of the form
(or subform) to limit the returned results.

You will need to use code to determine which checkboxes are
checked, which textboxes have text and generate the where clause
for the filter property.

--
Bob Quintal

PA is y I've altered my email address.
Mar 27 '06 #3
PCD
Why didn't you recommend to the OP to iterate through all the records in his
database, selecting only those that are in the recordset his form is based
on, checking each checkbox in each selected record and then doing the
filtering? This would satisfy the OP's requirements so in your way of
thinking it would be perfectly correct. And as you say, it is a well
documented technique which you endorse.

PCD

"Bob Quintal" <rq******@sympatico.ca> wrote in message
news:Xn**********************@207.35.177.135...
Wo********@hotmail.com wrote in
news:11**********************@i40g2000cwc.googlegr oups.com:
Hello all,

I've just hit a brick wall. What I have is a form with a heap
of tick boxs and text box on it and down the bottom a subform
with shows the results. i also have a search button down the
buttom as well.

Now what I'd like to be able to do is for the user to select
and fill as many fields as they see fit then hit search and it
will show the results in the subform down the buttom that
comply to one or all of the search critea.

The trouble i'm having is with the whole optional thing in the
query.. the few thing i have tryed have just shown me null
values.

If someone could help me it would be great.

Cheers

Since we don't know what you've tried, it's kinda difficult to
suggest alternatives.

I've found that the best way is to have the query return all
records and use the filter and filterOn properties of the form
(or subform) to limit the returned results.

You will need to use code to determine which checkboxes are
checked, which textboxes have text and generate the where clause
for the filter property.

--
Bob Quintal

PA is y I've altered my email address.

Mar 27 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by William Ryan | last post: by
6 posts views Thread by Phil Lee | last post: by
1 post views Thread by Woodies_46 | last post: by
1 post views Thread by Tookelso | last post: by
reply views Thread by zattat | last post: by
1 post views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.