473,804 Members | 3,570 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 8328
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.r r.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******@examp le.invalid> wrote in message
news:cs******** *************** ******@40tude.n et...
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.r r.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*********@ro cketmail.com> wrote in message
news:11******** *************@f 14g2000cwb.goog legroups.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.r r.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
9716
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 the same result on Windows as on Unix, inspite of Windows not
1
10634
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, if name 'Smith' is submitted, sproc should retrieve all records containing 'John Smith', 'Zenia Smith', 'Smithfield & Co.' You get the idea. Using SQL Query Analyzer, the query select * from file
3
3504
by: sashi | last post by:
Hi, Is it possible to use wildards in SQL to drop a constraint on a table? Thanks!
11
9183
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 that the file starts with a standard name but adds the date and some other stuff to the end of the file name. Is there a way I could use a wildcard like "*" so I wouldn't have to change the name? Thanks for any help
10
5124
by: Alvaro Puente | last post by:
Hi all! Do any of you know if wildcards are accepted when calling rename() function? Thanks/Alvaro
2
5116
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 this. I have tried using the Like comparision operator but about all I can do with it is replace a whole string that contains the wildcard search string. I want to do something like finding *mysea?rch in a string like "This is mysearch string...
1
6680
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 %, those characters should be escaped in brackets (). If a bracket is in the clause, the bracket characters should be escaped in brackets (for example or
19
4663
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 FileSearch in win98 to fill an array with filenames with no problems since about 1998. From the 97 Help: (The Filename Property of the FileSearch object) --------------------------
5
36652
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 LIKE @ProductName" in WHERE clause of a select statement, and a stored procedure uses the user defined function while passing @ProductName input parameter to the user defined function, is there any security risks? Is there a better way to construct...
0
9705
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9576
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10310
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7613
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5515
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2983
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.