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

Creating Report with Criteria selected from Form

Status
Not open for further replies.

sis19signe

Technical User
Sep 9, 2003
2
US
I am creating an inventory database for the company I am co-oping with. This is my first time working in Access. I want to know how to create a form that selects the criteria in a report. I don't know any VB or SQL. If you can help, that would be wonderful. Thank you.
 
Without more information from you as to what it is you are really trying to do, take a look at help file for:

DoCmd.OpenReport

And some of the optional arguements you can use. Most importantly for you is the WHERE portion...which allows you to filter a standard report based on selections from combo/list/text boxes or whatever.

****************************
Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former. (Albert Einstein)

Robert L. Johnson III
MCSA, CNA, MCP, Network+, A+
w: rljohnso@stewart.com
h: wildmage@tampabay.rr.com
 
The technique you need is called QBF (Query by Form). You create an unbound form with unbound text boxes for the user to type or select (from combo box) whatever is to be the criteria for the report. The report is based on a query that includes the criteria from the report. The query might have a criteria such as:
Forms![Unbound Form Name]![Unbound Field Name]. If the form includes fields that the user may leave blank in order to obtain all the data, use the following version of the above query criteria:
Forms![Unbound Form Name]![Unbound Field Name] OR Forms![Unbound Form Name]![Unbound Field Name]Is Null
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top