Dates for reports

  • Thread starter Thread starter Darla
  • Start date Start date
D

Darla

I am trying to come up with a way to print the dates on my
report for [Beginning Date] and [Ending Date]. My query
calls out for this in the criteria of the production
date. I have tried creating text boxes on my report with
the control source as =Reports!plant1chart![Beginning
Date]. But this doesn't work.

I know their is code that will hold the dates and put them
in a text box but I can't find my sample.

Any help? Thanks!!!
 
If your report is based on the query that asks the user for this
information, then all you need in your text box is...

= [Beginning Date]

and

= [Ending Date]



you could even do something like...


= "Between " & [Beginning Date] & " and " & [Ending Date]




I am trying to come up with a way to print the dates on my
report for [Beginning Date] and [Ending Date]. My query
calls out for this in the criteria of the production
date. I have tried creating text boxes on my report with
the control source as =Reports!plant1chart![Beginning
Date]. But this doesn't work.

I know their is code that will hold the dates and put them
in a text box but I can't find my sample.

Any help? Thanks!!!
 
One of the most common solutions for the result you want is to create a
pop-up form that allows the user to enter dates and other criteria into
unbound controls. Use the names of those controls as criteria in the
queries that are the record sources of your reports. (i.e. a query with a
date filed would have the select criteria of "Between forms!myform!startdate
and forms!myform!enddate"). Your report would then show records meeting
that criteria. Your report could also have unbound controls to display the
contents the controls on your form (i.e. an unbound control on your report
called [Startdate] would have a record source of "=forms!myform!startdate").
-Ed
 
I've created my form to use and tried to put the criteria
into my query.

"Between forms!frmfordates!startdate and forms!frmfordates!
enddate"

But it pops up with a parameter dialog box and after I
fill that in it says the expression is to
complex..yada..yada...yada...

Am I missing something for my criteria?

Thanks for your help
-----Original Message-----
One of the most common solutions for the result you want is to create a
pop-up form that allows the user to enter dates and other criteria into
unbound controls. Use the names of those controls as criteria in the
queries that are the record sources of your reports. (i.e. a query with a
date filed would have the select criteria of "Between forms!myform!startdate
and forms!myform!enddate"). Your report would then show records meeting
that criteria. Your report could also have unbound controls to display the
contents the controls on your form (i.e. an unbound control on your report
called [Startdate] would have a record source of "=forms! myform!startdate").
-Ed



I am trying to come up with a way to print the dates on my
report for [Beginning Date] and [Ending Date]. My query
calls out for this in the criteria of the production
date. I have tried creating text boxes on my report with
the control source as =Reports!plant1chart![Beginning
Date]. But this doesn't work.

I know their is code that will hold the dates and put them
in a text box but I can't find my sample.

Any help? Thanks!!!


.
 
It sounds like the form is not staying open so that the start/end date
values can be used in the query. Be sure that your [startdate] and
[enddate] controls are unbound text boxes with the format and input
properties set to "short date". Try putting a command button on your form
that has code to run your report. The control wizard will build one for
you. Then when the report runs, it will run the query, and the query will
read the values from the still open pop-up form. If you're still getting
prompted for parameters, then some other column in your query may have
[....] criteria.
-Ed

Darla said:
I've created my form to use and tried to put the criteria
into my query.

"Between forms!frmfordates!startdate and forms!frmfordates!
enddate"

But it pops up with a parameter dialog box and after I
fill that in it says the expression is to
complex..yada..yada...yada...

Am I missing something for my criteria?

Thanks for your help
-----Original Message-----
One of the most common solutions for the result you want is to create a
pop-up form that allows the user to enter dates and other criteria into
unbound controls. Use the names of those controls as criteria in the
queries that are the record sources of your reports. (i.e. a query with a
date filed would have the select criteria of "Between forms!myform!startdate
and forms!myform!enddate"). Your report would then show records meeting
that criteria. Your report could also have unbound controls to display the
contents the controls on your form (i.e. an unbound control on your report
called [Startdate] would have a record source of "=forms! myform!startdate").
-Ed



I am trying to come up with a way to print the dates on my
report for [Beginning Date] and [Ending Date]. My query
calls out for this in the criteria of the production
date. I have tried creating text boxes on my report with
the control source as =Reports!plant1chart![Beginning
Date]. But this doesn't work.

I know their is code that will hold the dates and put them
in a text box but I can't find my sample.

Any help? Thanks!!!


.
 
Back
Top