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!

Date Range - From form to report

Status
Not open for further replies.

ThePixelMines

Technical User
Jun 6, 2007
17
US
This is a newbie questions so I hope it will get answered quickly. I searched the posts but couldn't find the answer I was looking for.

I have a report that relies on date ranges. What I'd like is a pretty little form that asks for the date ranges and has a button to call up the report with the applied dates. What's the general procedure to accomplish this? I can't find how to get the dates to the report. Right now the report is generated from a query that has unspecified BeginDate and EndDate fields so it asks for them. See Relationships for Production for reference.

In the same vain, I have another database for my kid's preschool roster. This is the first year I've used it so there's only one class for the report to look up. I have it kinda hardwired in my Query. In this case, [School Years.schoolyear_ID] = 1 (as there's only one year so far). For this one it would be nice to have a form with a combo box from which you could choose a year and a button to call up the report with the applied [schoolyear_ID]. Is it about the same procedure. See Relationships for Southside for reference.

Thanks in advance for the help.

Check it, Fool!
 
There are a couple methods at IMHO parameter prompts are never appropriate.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
dhookom -

I've seen in other posts that you recommend against them. What are the alternatives? Or is there a way to structure your forms so that you don't have them?

Check it, Fool!
 
I always allow users to enter criteria values in controls on forms. Allen Browne describes using this method.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
OIC. You're talking about what Browne calls "Parameter query."

Yes, that's all I had before because I didn't know how to get the forms to work.

So, with a little tweaking this technique should work with a combo box, too?

By the way, thanks for the help dhookom. It worked like a charm!

Check it, Fool!
 
You can/should use combo boxes where possible rather than text boxes. The more help you can give your users, the better.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top