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

Help with setting criteria in VB Code

Status
Not open for further replies.

rlh777

Technical User
Oct 14, 2002
36
US
I have an Access 2000 database. I am trying to create a criteria form to pull reports from. The fields on the report are: OfficeTypeID & Zone. They pull from a Query called: qry_SiteVisit. In the Query, the Field Names are: ZoneDesc and OfficeTypeID. No criteria is established in the Query itself. It doesn't matter to me if the criteria is set up in the Code or on the Query. All I know is that I need this to work. I would like a user to be able to select both Office Type and a Zone and come up with the end result, or select just one of the options and get a result returned. Finally, I would like it that if both fields were Null, I would get everything on the report. The report is called: rpt_SiteVisit. The qry_SiteVisit is made up of several tables. The table where OfficeTypeID is pulled from is: tbl_Customer. The table where the ZoneDesc is pulled from is: tbl_Zone. Can anyone HELP? I have the form set-up to print preview and print properly. I just can't get the proper criteria.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top