steve711
02-27-2005, 03:02 PM
Hello All,
I have a list box with all of my pilots' names in it. And a text box that I put a month and year into and would like to print a report for every pilot I have on and his flight times for that month and year. I can do this no problem with the following code.
On Error GoTo Err_runQuery_Click
DoCmd.RunCommand acCmdSaveRecord
stDocName = "rptPerPilotCP"
DoCmd.OpenReport stDocName, acViewPreview, , "[tblDate by Month] = '" & mydate & "'"
DoCmd.Maximize
Problem is that when it opens the report I need each page to be an individual pilot. It is not doing that now however. Any words of wisdom here?
I have a list box with all of my pilots' names in it. And a text box that I put a month and year into and would like to print a report for every pilot I have on and his flight times for that month and year. I can do this no problem with the following code.
On Error GoTo Err_runQuery_Click
DoCmd.RunCommand acCmdSaveRecord
stDocName = "rptPerPilotCP"
DoCmd.OpenReport stDocName, acViewPreview, , "[tblDate by Month] = '" & mydate & "'"
DoCmd.Maximize
Problem is that when it opens the report I need each page to be an individual pilot. It is not doing that now however. Any words of wisdom here?