Searching for records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do create a search function that will allow a command button to search
for an entry in a table using the information from a combo box? Here's more
information:

I have a table that is linked to an excel spreadsheet. The table consists of
all the computers the company has purchased along with the service tags of
the computers.

I want to make a form that will allow the user to input a service tag and
get the corresponding information of the system. How can I do that?

Thanks a lot.

John
 
If it were me, I'd use the combo-box wizard to add a combo-box to the form.
The wizard will give you the option of finding a record based on the
selection made by the user.

After adding this and letting the wizard build your code for you, you could
always change the control to a plain text box if you don't want the
drop-down.
 
HI there... a little off topic (but only slightly)... can a combo box be
added to the 'switchboard' so a record can be searched from the very first
screen the user sees? I have my switchbard set to open automatically whenthe
database is started.

Thanks in advance for any help!
 
Yes and No. You can add a combo-box and then use that data in the open
event of your various forms, but the wizard won't let you set the combo-box
to open a particular record since the switchboard is the form it would do
that on, and the switchboard has no underlying records.

You could code your switchboard buttons to open the appropriate form and to
use the combobox data in the form's filter or in the query upon which the
form is based.
 
Thank you very much. It works great.

Rick B said:
Yes and No. You can add a combo-box and then use that data in the open
event of your various forms, but the wizard won't let you set the combo-box
to open a particular record since the switchboard is the form it would do
that on, and the switchboard has no underlying records.

You could code your switchboard buttons to open the appropriate form and to
use the combobox data in the form's filter or in the query upon which the
form is based.
 
Back
Top