Help!

  • Thread starter Thread starter acadprogrmr via AccessMonster.com
  • Start date Start date
A

acadprogrmr via AccessMonster.com

I need to pull a report for printing that is the result of the user entering
a start date and an end date as well as a location.
My approach is to create the parameters form with these three text boxes and
two controls (ok, cancel).

Right now I have a switchboard with a button setup as "report by date and
location".
I imagine when this button is pressed, a new dialog box comes up and asks for
the start date, end date, and location. Then take these values and "feed
them" to the report so not all the table is displayed.

Am I totally crazy or is this do-able? How do I pass variables to other
forms? Or Do I? Where are global variables declared?

Acad
 
acadprogrmr said:
I need to pull a report for printing that is the result of the user entering
a start date and an end date as well as a location.
My approach is to create the parameters form with these three text boxes and
two controls (ok, cancel).

Right now I have a switchboard with a button setup as "report by date and
location".
I imagine when this button is pressed, a new dialog box comes up and asks for
the start date, end date, and location. Then take these values and "feed
them" to the report so not all the table is displayed.

Am I totally crazy or is this do-able? How do I pass variables to other
forms? Or Do I? Where are global variables declared?

Acad

I had a similar problem, I solved it by calling a querry instead of the
table. Just make a querry from the table. Open it in Design-View.

In the date field to be querried, in the row 'criteria' put the code:
Between [Start_date] And [End_date]
Start_date and End_date are not fields in the querry, so when the querry
is opened, it will promt the user to input them.

Do the same with the location field:
=[Ented_Location]

Hope this helps!

Jeff
 
I need to pull a report for printing that is the result of the user entering
a start date and an end date as well as a location.
My approach is to create the parameters form with these three text boxes and
two controls (ok, cancel).

Right now I have a switchboard with a button setup as "report by date and
location".
I imagine when this button is pressed, a new dialog box comes up and asks for
the start date, end date, and location. Then take these values and "feed
them" to the report so not all the table is displayed.

Am I totally crazy or is this do-able? How do I pass variables to other
forms? Or Do I? Where are global variables declared?

You can do even better than that... <g>

Put three textboxes, or - even better - two textboxes for the date and
a Combo Box for the location, and a button to launch the report, on a
Form (it could be your switchboard form or another form opened from
the switchboard).

Base your Report on a Query with criteria such as

BETWEEN Forms![YourForm]![txtStart] AND Forms!YourForm![txtEnd]

for the date field and

=Forms![YourForm]!cboLocation

for the location field.

John W. Vinson[MVP]
 
Jeff said:
I need to pull a report for printing that is the result of the user entering
a start date and an end date as well as a location.
[quoted text clipped - 11 lines]

I had a similar problem, I solved it by calling a querry instead of the
table. Just make a querry from the table. Open it in Design-View.

In the date field to be querried, in the row 'criteria' put the code:
Between [Start_date] And [End_date]
Start_date and End_date are not fields in the querry, so when the querry
is opened, it will promt the user to input them.

Do the same with the location field:
=[Ented_Location]

Hope this helps!

This helped a lot. I think I worded my question with "a dialog box" when
what I should have said is "new form". Nothing is etched in stone that says
it must be done this way...its just a really cool dialog box (hahaha). I
would like to eventually give them additional options how to pull the report
with radio buttons. So, do you have any suggestion how to make this
switchboard call the form and retain this data to feed to a querry to display
results? Thanks again for your help.
 
John said:
I need to pull a report for printing that is the result of the user entering
a start date and an end date as well as a location.
[quoted text clipped - 9 lines]
Am I totally crazy or is this do-able? How do I pass variables to other
forms? Or Do I? Where are global variables declared?

You can do even better than that... <g>

Put three textboxes, or - even better - two textboxes for the date and
a Combo Box for the location, and a button to launch the report, on a
Form (it could be your switchboard form or another form opened from
the switchboard).

Base your Report on a Query with criteria such as

BETWEEN Forms![YourForm]![txtStart] AND Forms!YourForm![txtEnd]

for the date field and

=Forms![YourForm]!cboLocation

for the location field.

John W. Vinson[MVP]

You may have given me exactly what I needed. I am going to try it. Woo woo.
Thanks!!
 
Back
Top