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

New to Reports...Help with something easy

Status
Not open for further replies.

Brlee1crv

Technical User
Apr 10, 2003
96
US
Hi everyone. I've never created reports before and forced to start learning quick. I have a basic table that has a Name column and a Date column. How can I create a report which allows a user to select a name from a list, enter a date range and the report displays a count broken down by month. I've created a form with a combo box that has all the names in it. The form also has two unbound text boxes where the user enters the date(s). What next?
 
Well, sounds like you are off to a good start. Say your table is called Tbl, and your form is called Frm.

On your form, you have an unbound box where they get the name, called Box, and date fields called From and To.

So, write a query based on that like the following:

SELECT Tbl.Name, Tbl.Date, Tbl.Amount
FROM Tbl
WHERE (((Tbl.Name)=[forms]![frm].[box]) AND ((Tbl.Date)>=[forms]![frm].[from] And (Tbl.Date)<=[forms]![frm].[to]));

Save the query, and base your report on it.

Hope that helps a little.

 
Thanks that works. How can I have the form pop up to prompt the user to enter the info and what code needs to be behind the command button to get the report to run?
 
Well, if you click on the command button, and place one on your form, it will walk you through it. It should call up a wizard that askes what you want it to do.

As for the form popping up, I am not sure what you mean. If you mean asking the user for the information, instead of using a form, you can add questions to the query, by replacing the reference to the form and just putting [Enter Starting date] or what not. When the report or query runs, it will force the user to answer the question.

ChaZ



Ascii dumb question, get a dumb Ansi
 
Sorry you're right..don't know what i was thinking. Is there a way for a user to run a report for more than one person. Say for instance I'd like to run a report for Bob and Mike. I tried using an asterisk but nothing comes up in the results. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top