Search button for specific field

ritchiehicks

New member
Local time
Today, 00:22
Joined
Mar 3, 2008
Messages
6
Hi,

I wish to place a command button next to a specific field which when clicked, launches the search command ready to search records against that field.

I have already tried this and managed to place a button to search - however, this searches every field in every record - I just want to search 1 specific field.

I am a bit new to this, so please be as untechy as possible!

Thanks,
Ritchie.
 
Have you searched these forums for topics related to searching. There are lots and lots and lots...
 
Have you searched these forums for topics related to searching. There are lots and lots and lots...

Yes, but none that answer my query.

Perhaps you could be helpful and supply a link to a topic that answers this question?
 
after you click your search button do

set the focus to the field you want to search, then look at

docmd.findrecord

- its equivalent to clicking the binoculars - options in there are for all fields/current field etc

i use one button for findfirst, and one for find next - still uses docmd.findrecord, but slightly different parameters
 
Or have a macor or code that opens the form with matching data. That can better than Find Record if there will be more than one record.

You can also change the recordsource of the form based on a parameter query which uses the entry in your textbox for the criteria. This method is good if you want to avoid someone accidentally releasing the filter with an openform command
 
How I can search by text box or by combo box or by both of them at the same time?
Can any one attach a little example please?

Many thanks in advance

vbnt
 

Users who are viewing this thread

Back
Top Bottom