Report where user can be prompted for a search criteria and displa

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a database with two tables, one is a meetings table and another is a
participants table, with a one to many relationship. I have trying to create
a report where it will display all meetings that meet a certain criteria. The
criterial is it should prompt the user to put in a search criteria, for
example, DateFrom, DateTo, Participant Name. So, the user would enter in
these 3 fields and hit search and out comes a report with the information.
Is there a simple way to accomplish this. Any sample code or way of doing it
would help. Thanks a bunch in advance.
 
Create a query that returns the information you need, then put

Between [DateFrom] And [DateTo]

as the criteria under the date field, and

[ParticipantName]

as the criteria name under the appropriate field.

If you want to be able to type only part of the name and have it work, put

Like "*" & [ParticipantName] & "*"

as the second criteria.

Use this query as the recordsource for your report.
 
The best way is to create a query and a form with the parameters that need to
be searched. You will also need examples of the LIKE criteria in the query.
The criteria in the query of the fields you need to search will point back to
the Forms text fields that you are entering.

Example is Like(Forms!FormName!Field) "L*" You can also check out the
Between Command in several Northwind DB Queries.

Good Luck
 
Back
Top