473,385 Members | 1,707 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,385 software developers and data experts.

ComboBox Wildcards???

I have a form with several ComboBoxes. One of these is Surname, can I make
it select all the Smiths for example by using wildcards? At the moment my
query only picks up the individual Surname selected.

Perhaps I need to re-work my form, but any ideas would be welcomed.

Andy
Nov 13 '05 #1
6 8280
Andy

How about have two combo boxes? The first lists only one instance of each last
name. When you choose one, the second combo box will list all the names with
just the same last name as the one selected in combo box 1.

Deborah

Andy wrote:
I have a form with several ComboBoxes. One of these is Surname, can I make
it select all the Smiths for example by using wildcards? At the moment my
query only picks up the individual Surname selected.

Perhaps I need to re-work my form, but any ideas would be welcomed.

Andy


Nov 13 '05 #2
Thanks for your reply.

In fact, I have numerous ComboBoxes and it would be useful to use wildcards
in any of them, so I dont really want to double them up. Any other ideas ??
;-)

Andy

"Deborah V. Gardner" <dg******@twcny.rr.com> wrote in message
news:42***************@twcny.rr.com...
Andy

How about have two combo boxes? The first lists only one instance of each
last
name. When you choose one, the second combo box will list all the names
with
just the same last name as the one selected in combo box 1.

Deborah

Andy wrote:
I have a form with several ComboBoxes. One of these is Surname, can I
make
it select all the Smiths for example by using wildcards? At the moment my
query only picks up the individual Surname selected.

Perhaps I need to re-work my form, but any ideas would be welcomed.

Andy

Nov 13 '05 #3
On Wed, 6 Apr 2005 19:54:32 +0100, Andy wrote:
I have a form with several ComboBoxes. One of these is Surname, can I make
it select all the Smiths for example by using wildcards? At the moment my
query only picks up the individual Surname selected.

Perhaps I need to re-work my form, but any ideas would be welcomed.

Andy


If your query parameter is
forms!FormName!ComboName
and "Smith" is the value of the BOUND column in the combo box
selected, then your query will return all records that have exactly
"Smith" as the SurName.

Did you wish to return Smith, Smithers, and Hammersmith?

Like "*" and forms!formName!ComboName & "*"

But then why use a combo box?
A regular text control would do just as well in this case.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #4
I have several ComboBoxes on my form and in general a "unique" selection
from the ComboBox is fine.
Another ComboBox on my form has membership no.s which again would be useful
to be able to use wildcards.
So being able to return Smith, Smithers, and Hammersmith from the surname or
A100 - A134 from the membership number would be useful.

Andy
"fredg" <fg******@example.invalid> wrote in message
news:cs*****************************@40tude.net...
On Wed, 6 Apr 2005 19:54:32 +0100, Andy wrote:
I have a form with several ComboBoxes. One of these is Surname, can I
make
it select all the Smiths for example by using wildcards? At the moment my
query only picks up the individual Surname selected.

Perhaps I need to re-work my form, but any ideas would be welcomed.

Andy


If your query parameter is
forms!FormName!ComboName
and "Smith" is the value of the BOUND column in the combo box
selected, then your query will return all records that have exactly
"Smith" as the SurName.

Did you wish to return Smith, Smithers, and Hammersmith?

Like "*" and forms!formName!ComboName & "*"

But then why use a combo box?
A regular text control would do just as well in this case.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.

Nov 13 '05 #5
Try this: Make sure that "Limit to List" is not selected your combo
box so that you can key in anything. When you link to this combo box
in your query or recordset or whatever, filter the link through "like"
and add "*" on both sides in your WHERE clause.

Example:

Instead of [forms]![main form]![cmbName] use:

like ("*" & [forms]![main form]![cmbName] & "*")

This also works with values that your query asks for. Surround the
value you are asking for by "*" and it will select all records if you
leave it blank!

If the source combo box is blank, you will get everything. If you have
part of a name in it, it will select every record with that name. One
bad thing, though: It it will also select partials with that name.
For example, "Smithfield" will be selected even if you select "Smith"
Hummm. I don't know how to get around that one. Depends on what you
are trying to do with the recordset.

Good luck!

Alex.
Andy wrote:
Thanks for your reply.

In fact, I have numerous ComboBoxes and it would be useful to use wildcards in any of them, so I dont really want to double them up. Any other ideas ?? ;-)

Andy

"Deborah V. Gardner" <dg******@twcny.rr.com> wrote in message
news:42***************@twcny.rr.com...
Andy

How about have two combo boxes? The first lists only one instance of each last
name. When you choose one, the second combo box will list all the names with
just the same last name as the one selected in combo box 1.

Deborah

Andy wrote:
I have a form with several ComboBoxes. One of these is Surname, can I make
it select all the Smiths for example by using wildcards? At the moment my query only picks up the individual Surname selected.

Perhaps I need to re-work my form, but any ideas would be welcomed.
Andy


Nov 13 '05 #6
Thanks Alex... That works just great.

Cheers

Andy

"Alex" <al*********@rocketmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Try this: Make sure that "Limit to List" is not selected your combo
box so that you can key in anything. When you link to this combo box
in your query or recordset or whatever, filter the link through "like"
and add "*" on both sides in your WHERE clause.

Example:

Instead of [forms]![main form]![cmbName] use:

like ("*" & [forms]![main form]![cmbName] & "*")

This also works with values that your query asks for. Surround the
value you are asking for by "*" and it will select all records if you
leave it blank!

If the source combo box is blank, you will get everything. If you have
part of a name in it, it will select every record with that name. One
bad thing, though: It it will also select partials with that name.
For example, "Smithfield" will be selected even if you select "Smith"
Hummm. I don't know how to get around that one. Depends on what you
are trying to do with the recordset.

Good luck!

Alex.
Andy wrote:
Thanks for your reply.

In fact, I have numerous ComboBoxes and it would be useful to use

wildcards
in any of them, so I dont really want to double them up. Any other

ideas ??
;-)

Andy

"Deborah V. Gardner" <dg******@twcny.rr.com> wrote in message
news:42***************@twcny.rr.com...
> Andy
>
> How about have two combo boxes? The first lists only one instance of each > last
> name. When you choose one, the second combo box will list all the names > with
> just the same last name as the one selected in combo box 1.
>
> Deborah
>
> Andy wrote:
>
>> I have a form with several ComboBoxes. One of these is Surname, can I >> make
>> it select all the Smiths for example by using wildcards? At the moment my >> query only picks up the individual Surname selected.
>>
>> Perhaps I need to re-work my form, but any ideas would be welcomed. >>
>> Andy
>

Nov 13 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Bharath Dhurjati | last post by:
Hello, I am looking for documentation that specifies the following behavior exhibited by java. The following (assuming MyClass.class is accessible and has a main()) java MyClass * yields...
1
by: Ralph Noble | last post by:
I thought this problem would go away over the Christmas holiday, but of course it did not. I'm trying to write a stored procedure incorporating wildcards, so I can search for variations. Example,...
3
by: sashi | last post by:
Hi, Is it possible to use wildards in SQL to drop a constraint on a table? Thanks!
11
by: Shyguy | last post by:
I need to import a text file pretty much daily. I download the file and change the name to a standard name and then run the code to import the file into a table in my database. The problem is...
10
by: Alvaro Puente | last post by:
Hi all! Do any of you know if wildcards are accepted when calling rename() function? Thanks/Alvaro
2
by: Dennis | last post by:
I am trying to implement a "Find and Replace" dialog that allows using wildcards in the find string, much like the Find and Replace Dialogs in Ms Word, etc. Are there any references or examples on...
1
by: Anandan | last post by:
Hi, This is regarding Dataset Filter: WILDCARD CHARACTERS Both the * and % can be used interchangeably for wildcards in a LIKE comparison. If the string in a LIKE clause contains a * or %,...
19
by: Alan Carpenter | last post by:
Access 8 on Win98 and WinXP I'm having trouble with wildcards in the .Filename property of the FileSearch Object giving different results on win98 and XP. I've been successfully using...
5
by: nidaar | last post by:
From a security point of view, is accepting wildcards like "%" in input parameters of stored procedures against any best practices? As an example, if a user defined function uses "Productname...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.