Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I search a form??????? 1

Status
Not open for further replies.

closetnuke

Technical User
Jan 30, 2002
8
0
0
US
I have a project for my company to create a database.... a very large database. Because of it's size I need to create a search feature. However, I've never really used Access before so I don't know how to do this. Please help....

Closetnuke
 
what kind of search feature? you need to be able to search multiple fields?
Most times you make a query use it as a recordsource for a form. You can prompt for parameters in the query criteria grid.
criteria: [please enter client name]

to query between a range:

criteria: between [please enter starting range number] and
[please enter ending range number]

or query with a wildcard:

criteria: Like "*" [enter first letters of name]"*"

You may also want to do a ad hoc query. that involves VBA code.
Hope this helps
raven
 
It needs to be a user input search for multiple fields within a single form. Field 1 is a string and field 2 is numeric.
 
Forgot to mention. I also want it to bring up the record or records that match the search. It has to search nearly 1000 records and bring up just the pertinent ones based on a users input.
 
Morning,
1st. create a query with all the fields you need for the form.
In the criteria section of the fields you want to search enter:
Like [enter a name or part of name and an *]
In the numeric field do the same:
Like [Enter a number or part of number and an *]
(The prompt lengths might be too long.)
Create your form and use the query name as the record source.
When you open the form the "enter parameter box" will open for the name and when you continue the other "enter parameter box" will open prompting for the number.
The info will then be displayed on the form.
In the properties section of the form be sure to make the view as "continuous."
Jim
 
Well the form has already been created. I would like to use a search button similar to those on the web. I was told to use a macro by a co worker, but he couldn't remember how to set up the macro. The query idea seems like it would work, but can I use that if I've already created the form???


Closetnuke
 
Sure, just be sure the fields in the query match the fields on the form. Rename the record source to the new query.
The "button" would be a command button placed where you want it, do the "form operation" and select open form, and then the name of the form.
Name the button and Voila.

Jim
 
Okay, The enter parameter box never shows up. Should I just create a new form and copy all the records over???
 
Nevermind, Had to do some fooling around with the properties. I appreciate your assistance, jim. Don't fear though, I may need it again.


closetnuke
 
Hi close,
Check your query.
In the Criteria section of the field be sure the:
Like [whateveryouwant]
is there and open the query.
The info should be listed almost like an xcel spreadsheet.
If you get that far try creating a new form with the form wiz and reference the query as the record source.
When the form is opened the Enter Param boxes should open.
Jim
 
Any time.
I am not a programmer, unlike so many of the really smart people on this forum. I muddle through till it works.
I really admire the expertise these guys/girls can whip out in just a few minutes to help people with the problems that occur. Most of the VB coding is way beyond me.
Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top