User input criteria appearing on report

  • Thread starter Thread starter Logo
  • Start date Start date
L

Logo

I have a report that asks the user for beginning and ending dates. How can I
get these dates to print on my report? TIA
 
IMO, these values should always be entered by the user into controls on a
form. This is a much better user interface since it allows defaults and lots
of other functionality. You can then add a text box to your report with a
control source like:
="Between " & Forms!frmRptDates!txtStartDate & " and " &
Forms!frmRptDates!txtEndDate

If you choose to leave your interface as is, you can simply set a control
source to something like:
="Between " & [Enter Begin Date] & " and " & [Enter End Date]
 
So I should have my users open reports through the form then?
--
Logo


Duane Hookom said:
IMO, these values should always be entered by the user into controls on a
form. This is a much better user interface since it allows defaults and lots
of other functionality. You can then add a text box to your report with a
control source like:
="Between " & Forms!frmRptDates!txtStartDate & " and " &
Forms!frmRptDates!txtEndDate

If you choose to leave your interface as is, you can simply set a control
source to something like:
="Between " & [Enter Begin Date] & " and " & [Enter End Date]

--
Duane Hookom
Microsoft Access MVP


Logo said:
I have a report that asks the user for beginning and ending dates. How can I
get these dates to print on my report? TIA
 
Yes. I typically have a form with controls to allow selecting various
criteria. A command button is available to open the report.

--
Duane Hookom
Microsoft Access MVP


Logo said:
So I should have my users open reports through the form then?
--
Logo


Duane Hookom said:
IMO, these values should always be entered by the user into controls on a
form. This is a much better user interface since it allows defaults and lots
of other functionality. You can then add a text box to your report with a
control source like:
="Between " & Forms!frmRptDates!txtStartDate & " and " &
Forms!frmRptDates!txtEndDate

If you choose to leave your interface as is, you can simply set a control
source to something like:
="Between " & [Enter Begin Date] & " and " & [Enter End Date]

--
Duane Hookom
Microsoft Access MVP


Logo said:
I have a report that asks the user for beginning and ending dates. How can I
get these dates to print on my report? TIA
 
Cool, thank you very much
--
Logo


Duane Hookom said:
Yes. I typically have a form with controls to allow selecting various
criteria. A command button is available to open the report.

--
Duane Hookom
Microsoft Access MVP


Logo said:
So I should have my users open reports through the form then?
--
Logo


Duane Hookom said:
IMO, these values should always be entered by the user into controls on a
form. This is a much better user interface since it allows defaults and lots
of other functionality. You can then add a text box to your report with a
control source like:
="Between " & Forms!frmRptDates!txtStartDate & " and " &
Forms!frmRptDates!txtEndDate

If you choose to leave your interface as is, you can simply set a control
source to something like:
="Between " & [Enter Begin Date] & " and " & [Enter End Date]

--
Duane Hookom
Microsoft Access MVP


:

I have a report that asks the user for beginning and ending dates. How can I
get these dates to print on my report? TIA
 
So I should have my users open reports through the form then?

I'll just throw in that we do it the other way around. We have our
*report* call our *form*.

You can have a report prompt the user for criteria before it runs by
opening a form from the report's Open event. Open the form in Dialog
mode so that the report waits for the form to be closed or hidden
before it proceeds. That way you can collect criteria from the user
and build a Where clause for the report. It also means that you can
call the report directly - you don't need to call it from a form. And
the selection form is reusable - it can be called from multiple
reports if they need the same criteria.

The form also build the criteria phrase in English so that you can add
it to the report.

I've posted examples of this technique on our free J Street Downloads
page at http://ow.ly/M58Y
See "Report Selection Techniques".

This technique is a bit more complex than just referring to the form
controls in the report, but it's more flexible too.

Armen Stein
Microsoft Access MVP
www.JStreetTech.com
 
Back
Top