Report form/ switch plate

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

Guest

I inherited a db and I am trying to add new reports to the DB. Our current
report functionality is set up so you can enter the date range you want to
run your report for, select who you want to run the report on and then select
the report.

Problem is I don't know how to create a new report that will link to the
date range boxes and to the drop down menu of names.

Any ideas to try?
 
Bonni,
So you have a dialog form before you open the report, and you want to pass variables
from the form to the report.
Ex. form frmMain, and text unbound text controls... StartDate, StopDate, and
EmployeeID.
In the query behind the report, you can refer to theose form values in your criteria...
(form must be open when report is run)

SomeDateField criteria...
Between Forms!frmMain!StartDate And Forms!frmMain!StopDate

EmployeeID criteria...
=Forms!frmMain!EmployeeID

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
Would I build these fields into my report also - that is how it appears the
builder of the db did it.
Or do I put them in both places?
 
Bonni,
Those form values are used "primarily" to criteria the fields in the report query,
but... they can also be referred to on your report.
When using a Date range it's often advisible to place a title line at the top of the
report that let's the user know what Date range the report data is constrained by.
Place an unbound text control on the report with a Control Source of...
= "From " & Forms!frmMain!StartDate & " to " & Forms!frmMain!StopDate
would yield ex. "From 1/1/07 to 2/1/07"
OR... another unbound text control...
= "Employee: " & EmployeeID
would yield... "Employee: 743"
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
Back
Top