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

report using more than 1 field 1

Status
Not open for further replies.

northernbloke

Programmer
Aug 9, 2000
29
0
0
GB
I'm new to Access, and so I'm trying to to simple things.

I a books database, of a single table with 5 fields:

ID (auto generated)
Author
Title
Category
Type

what I am wanting to do is create a report that will allow me to choose for example all books with Author of Microsoft, and a category of SQL.

I did do a single field within the report design view criteria - but this doesnt seem to work for multiple fields.

any links or info most welcome.
Thanks.
 
Create a query using your Table then make the Record Source for your Report the Query. Then on the criteria line for the Author Field put
[Enter Author]
and on the criteria line for Type put
[Enter Type]

This will get you close to what you need. Then if you want to expand the ability to use mulitple criteria, you can look at passing the values to the report from a Form (which is probably the best solution).

Try it out post back with problems.

Paul
 
thanks - i hadnt changed the source, so I could only get one field to be used for the selection.

BUT this now brings another problem:

I want to look at all books with Author of Microsoft.
can I use the same report and pass wildcards, or do I need to learn how to use forms (or alternatives) to use wildcards and similar

Cheers.
 
To use wildcards directly with a parameter in a query you would use
Like "*" & [Enter Author] & "*"

or you can do the same kind of thing using a form to hold the parameter values like this

Like "*" & Forms!FormName!Author & "*"


Paul
 
Many thanks - its good enough for now.

suppose if it was a real application then I'd have to learn quite a bit more.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top