O
Outatym
I have a series of reports that open on a command button click, but the users
have to select a month from a list box that they wants the report's queries
run for. I would like the report's label captions to have "Report for
(**listbox value**) 2007". These need to be able to be changed at runtime.
I've already declared a variable called Month at the global level.
How would I go about doing this? Also, how could I have that same values
transfer over to the queries?
Here is part of my coding so far....
Option Compare Database
Dim Month As String
Private Sub CMDBUTTON_Click()
On Error GoTo Err_Command4_Click
lstMonth.Value = Month
DoCmd.Close , "Printreports"
DoCmd.OpenReport "AL Report", acViewDesign, "", "", acNormal
DoCmd.RunCommand acCmdPrint
DoCmd.Close , ""
..
..
..
have to select a month from a list box that they wants the report's queries
run for. I would like the report's label captions to have "Report for
(**listbox value**) 2007". These need to be able to be changed at runtime.
I've already declared a variable called Month at the global level.
How would I go about doing this? Also, how could I have that same values
transfer over to the queries?
Here is part of my coding so far....
Option Compare Database
Dim Month As String
Private Sub CMDBUTTON_Click()
On Error GoTo Err_Command4_Click
lstMonth.Value = Month
DoCmd.Close , "Printreports"
DoCmd.OpenReport "AL Report", acViewDesign, "", "", acNormal
DoCmd.RunCommand acCmdPrint
DoCmd.Close , ""
..
..
..