D
Damian
It seems to me like this shouldn't be as difficult as it
is, but I'm trying to print out two reports with the same
ID field. I want the user to be prompted for the ID number
once, then have both reports print out based on that input.
It seems to me that this should work:
Dim Message as string, IDnum As String
Dim ReportA as string, ReportB As String
ReportA = "rpt_first"
ReportB = "rpt_second"
Message = "Please enter ID number."
IDnum = InputBox(Message)
DoCmd.OpenReport ReportA, acViewNormal, , _
[key_ID] = IDnum
DoCmd.OpenReport ReportB, acViewNormal, , _
[key_ID] = IDnum
but when I try to run it I get the error message "can't
find the field '|' referred to in your expression"
(runtime error 2465) on the Openreport command. I can't
figure out what field they're talking about.
Any ideas?
Damian
is, but I'm trying to print out two reports with the same
ID field. I want the user to be prompted for the ID number
once, then have both reports print out based on that input.
It seems to me that this should work:
Dim Message as string, IDnum As String
Dim ReportA as string, ReportB As String
ReportA = "rpt_first"
ReportB = "rpt_second"
Message = "Please enter ID number."
IDnum = InputBox(Message)
DoCmd.OpenReport ReportA, acViewNormal, , _
[key_ID] = IDnum
DoCmd.OpenReport ReportB, acViewNormal, , _
[key_ID] = IDnum
but when I try to run it I get the error message "can't
find the field '|' referred to in your expression"
(runtime error 2465) on the Openreport command. I can't
figure out what field they're talking about.
Any ideas?
Damian