i have added a command button but how do i use it to search data?

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

Guest

i have access 2003. i am trying to set up a database of customer information.
I have designed a form but i just need to know how to search the form for a
particular 1.
i have added a command button i now need to know how to use this to search
customer surnames. ie if i type in "Ta" it will bring up "Taylor", "Tanner"
etc..
please can comeone help! and in the simpliest, clearly explained way!
thanks
 
Hi Claire

Probably the easiest way is to link your form to a query. In the criteria
row under Surname type Like [Enter beginning of surname] & "*"

When you open the form a box will appear with Enter beginning of surname (or
wahtever you type inside the [] The "*" is a wild card which means the end of
the name can be anything. HTH
Sheila
 
That works ok thanks but i have one more slightly dumb question. how do you
link this query to my form?
thanks

Sheila D said:
Hi Claire

Probably the easiest way is to link your form to a query. In the criteria
row under Surname type Like [Enter beginning of surname] & "*"

When you open the form a box will appear with Enter beginning of surname (or
wahtever you type inside the [] The "*" is a wild card which means the end of
the name can be anything. HTH
Sheila

claire_t said:
i have access 2003. i am trying to set up a database of customer information.
I have designed a form but i just need to know how to search the form for a
particular 1.
i have added a command button i now need to know how to use this to search
customer surnames. ie if i type in "Ta" it will bring up "Taylor", "Tanner"
etc..
please can comeone help! and in the simpliest, clearly explained way!
thanks
 
Hi Claire

Open the form in Design View; without selecting any object on the form click
the Properties button on the toolbar (the button with a hand on it) That
should give you a dialogue box with the form properties. Go to the Data tab -
the first property is Data Source. Clcik the drop down arraow and choose your
query from the list. (Make sure that the query has all the fields in it that
you currently have in your form)
CLose the dialogue box then save and close your form.

Good Luck - Sheila

claire_t said:
That works ok thanks but i have one more slightly dumb question. how do you
link this query to my form?
thanks

Sheila D said:
Hi Claire

Probably the easiest way is to link your form to a query. In the criteria
row under Surname type Like [Enter beginning of surname] & "*"

When you open the form a box will appear with Enter beginning of surname (or
wahtever you type inside the [] The "*" is a wild card which means the end of
the name can be anything. HTH
Sheila

claire_t said:
i have access 2003. i am trying to set up a database of customer information.
I have designed a form but i just need to know how to search the form for a
particular 1.
i have added a command button i now need to know how to use this to search
customer surnames. ie if i type in "Ta" it will bring up "Taylor", "Tanner"
etc..
please can comeone help! and in the simpliest, clearly explained way!
thanks
 
For a little more flexibility, the OP could also learn about placing
combo box search tools on her forms. That way, if Claire needs to
search more than one method, she can. She could have search tools for
first names, last names, company names, etc.

Just a thought...

Betsy
 
Thank you so much!that works great!!

Sheila D said:
Hi Claire

Open the form in Design View; without selecting any object on the form click
the Properties button on the toolbar (the button with a hand on it) That
should give you a dialogue box with the form properties. Go to the Data tab -
the first property is Data Source. Clcik the drop down arraow and choose your
query from the list. (Make sure that the query has all the fields in it that
you currently have in your form)
CLose the dialogue box then save and close your form.

Good Luck - Sheila

claire_t said:
That works ok thanks but i have one more slightly dumb question. how do you
link this query to my form?
thanks

Sheila D said:
Hi Claire

Probably the easiest way is to link your form to a query. In the criteria
row under Surname type Like [Enter beginning of surname] & "*"

When you open the form a box will appear with Enter beginning of surname (or
wahtever you type inside the [] The "*" is a wild card which means the end of
the name can be anything. HTH
Sheila

:

i have access 2003. i am trying to set up a database of customer information.
I have designed a form but i just need to know how to search the form for a
particular 1.
i have added a command button i now need to know how to use this to search
customer surnames. ie if i type in "Ta" it will bring up "Taylor", "Tanner"
etc..
please can comeone help! and in the simpliest, clearly explained way!
thanks
 
well if you want to explain how to do this then i could try it. its for a
cattery database so it could be usefull to search cat names also!
so if you explain in simple way i would like to try to search multiple fields
thanks
 
I would encourage you to explore the uses of the combo box wizard. One
of the options allows you to set up a drop down list from which the
user makes a selection and that selection can move them to any desired
record in the database. So, for instance, if you had a database of
contact information, you could have one search combo for a LastName,
FirstName search of the primary person, and another for LastName,
FirstName of the spouse (sometimes those are different than the primary
person), and yet another that could search by company name, etc.

Here's how to explore this tool:

1] Go to the design view of the form you are using to view your data.
2] Be sure that your toolbox is showing.
3] Be sure that the "wand" tool is engaged (it should look like it's
pressed down)
4] Click on the combo box tool and then click on any blank area of the
form (remember that you can always move or resize the combo later)
5] At this point the wizard should kick into action. On the first
screen, the 3rd option is "find a record on my form based on the value
I selected in my combo box". This is the option you want. Click the
bullet for it.
6] Click "next".
7] The next screen lets you identify what field(s) the user will scroll
through to find the record they want. For example, if you wanted a
LastName, FirstName search, this is the screen that lets you identify
those two fields. Add the desired fields to the "selected fields" list
on the right side of the screen.
8] Click the "next" button.
9] The next screen shows you how the fields you selected will appear in
the drop down combo box.
10] Click the "next" button.
11] Give your combo box a meaningful label.
12] Click "Finish".

Now play with the tool you have created. You will discover that some
customizing will be necessary, but the basic tool will be in place.
For instance, I always sort the list and supress duplicates. Once you
have a combo box (or two!) in place, let us know and we can help with
customizing.

hth-

Betsy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top