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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

querying based on user input in form 2

Status
Not open for further replies.

Gerilee

Programmer
Mar 23, 2001
47
US
I am learning Access so if you can help me, please give me some details. I have recently taken 4 different level classes in Access and am now working on my first database. I am converting INFORMIX databases to Access. Currently in INFORMIX, the users are able to query using a form. They can query all records by entering nothing on the form or they can put in values in one or more fields and query the table based on those values. INFORMIX performs this without any extra code written. I am trying to figure out how to accomplish this in Access. I thought that I would have a Query command button on the form that the users could use after they enter data (or no data) in as many fields as they want. I would need to know in what fields the user entered data and select the appropriate data from the table based on that criteria. If they enter no data, I would need to know that, too, and then get all records from the table using no criteria. I am somewhat familiar with SQL but just needed to be pointed in the right direction to get this done. Do I need a query, a macro, or VBA code? How do I check if the user entered data in the field? I have lots of years experience in COBOL programming and some in 4GL so I think that I will be able to pick up fairly easily on VBA, if that's what I need. I have been reading and searching the FAQ's but have not found anything that I can understand.
 
[tt][Forms]![myForm]![myControl] OR [Forms]![myForm]![myControl] Is Null[/tt]
is the normal way to bring all the records if criteria left blank.
Some detailed tutorial availabel here

________________________________________________________
Zameer Abdulla
Help to find Missing people
You may be the boss' pet; but you are still an animal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top