473,396 Members | 1,963 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 1668
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ole S. Pedersen | last post by:
I have two tables: eg. a person-table (no nulls allowed), with an id and so on, and a person_course table (an intermediate table in a many-to many relationship between person table and courses...
13
by: William Ryan | last post by:
I just picked up a copy of John Robbins' debugging book and started to look at disassembled code. Anyway, I hate optional Parameters in VB, but I was checking them out to see what IL is created. ...
16
by: ad | last post by:
Does C#2.0 support optional parameters like VB.NET: Function MyFunction(Optional ByVal isCenter As Boolean = False)
6
by: Phil Lee | last post by:
Hi, I have added an optional nillable element to a schema like this - .... <xs:element minOccurs="0" maxOccurs="1" name="Id" type="xs:int" nillable="true"/> .... A class is generated from...
1
by: Woodies_46 | last post by:
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...
14
by: cody | last post by:
I got a similar idea a couple of months ago, but now this one will require no change to the clr, is relatively easy to implement and would be a great addition to C# 3.0 :) so here we go.. To...
1
by: Tookelso | last post by:
Hello, I would like to have a group of elements which are *required* in one context, but each one is *optional* in another context. For example: I have a configuration file which has a...
12
by: pamelafluente | last post by:
Hi guys, In the past I have used several time optional parameters in my function. But Now I am more inclined to think that they are more dangerous than useful, and probably better to be...
24
imrosie
by: imrosie | last post by:
Hello all experts, I'm a newbie and I tried, but unsuccessfully to make the Dlookup statement optional...Help. Here's my code: Private Sub Customer_ID_NotInList(newdata As String, Response As...
7
by: jamesclose | last post by:
My problem is this (apologies if this is a little long ... hang in there): I can define a function in VB.NET with optional parameters that wraps a SQL procedure: Sub Test(Optional ByVal Arg1...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.