SEARCHING!

S

Stephen Kempin

PLEASE HELP!! I was wondering if anyone could help me as I am trying to
create a form to SEARCH a database with. It's a very simple one-table
database, which just holds one table of contacts information (business type,
business name, address, postcode, contact name, contact surname, telephone
code, telephone number, and e-mail).



I want to create a form that I can search the table with. Basically I'd like
to use a similar form to which I use to put contact information in with. I'd
like to choose which fields to specify information in, and then click a
search button and have the database filter the contacts table for entries
with the specified information.



For example, I want to search for contacts with the surname 'James' and with
postcode 'WE4 3ES', I'd like to just fill the Surname and Postcode sections
of the search form in with these details, and then click a search button and
have the results pop up.



I REALLY need quite urgent advice on this! If anyone could advise me how to
achieve this, or has another method of achieving the same search function,
please contact me!! I heard something about using SQL, but am not sure if
this is appropriate or how to use it.
 
M

M.L. Sco Scofield

What you are looking for is referred to as "Query by Form." (QBF)

QBF can be implemented many different ways.

You can read about one of the simpler ways in the article at
http://support.microsoft.com/default.aspx?scid=kb;en-us;209645.

You can read about a more advanced way using VBA and SQL in the article
http://support.microsoft.com/default.aspx?scid=kb;en-us;210242.

I also have a sample of a VBA / SQL QBF in my July 1998 SQL presentation. Go
to http://www.scobiz.com and click on Presentations. (Yes it's old. Yes,
it's in Acc97 format. However, it does convert to Access 2000, 2002, and
2003 with no problems. Just make sure you have a reference to DAO checked.)
I have had may of the people from my classes and presentations use this
sample as a starting place to build their own QBFs.

Good luck.

Sco

M.L. "Sco" Scofield, Microsoft Access MVP, MCSD, MCP, MSS, A+
Denver Area Access Users Group Vice President www.DAAUG.org
MS Colorado Events Administrator www.MSColoradoEvents.com
Useful Metric Conversion #18 of 19: 8 nickels = 2 paradigms (My personal
favorite)
Miscellaneous Access and VB "stuff" at www.ScoBiz.com
 

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

Similar Threads


Top