Creating Search Forms

J

Jason

I have a Table with 5 Fields. Name, City, State, Zip, Registration
Date.

I am trying to design a form where I can search a date range within
the Registration Date field and search the remaining fields at the
same time. Plus I need results even is there is not a value in a
paticular field. For example, I'll do a search for State and a date
range and leave the other fields blank.

I have the form created and can search only one field at a time. I'm
sure my query criteria is way off. Any help greatly appreciated.

Jason.
 
T

Tom Wickerath

Hi Jason,

I suggest purchasing a good Access developer's book, if you don't have one available. The
technique you are looking for is known as Query by Form (QBF), but I'm not referring to the
rather limp QBF that is built into Access. Basically, you need to create the WHERE portion of a
SQL statement on-the-fly, and use this as a source of data for a subform that is displayed in
your search form.

Scott Barker offers one example in chapter 8 of Access 2000 Power Programming (SAMS Publishing).
This is a fairly common topic that is covered in most Access developer books that are geared
towards the intermediate to advanced level. You will need some familiarity with SQL (structured
query language) and VBA (Visual Basic for Applications) code.

Tom
_______________________________


I have a Table with 5 Fields. Name, City, State, Zip, Registration
Date.

I am trying to design a form where I can search a date range within
the Registration Date field and search the remaining fields at the
same time. Plus I need results even is there is not a value in a
paticular field. For example, I'll do a search for State and a date
range and leave the other fields blank.

I have the form created and can search only one field at a time. I'm
sure my query criteria is way off. Any help greatly appreciated.

Jason.
 

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

Top