N
NNlogistics
I run a report from a model form that I use to supply the Customer number to
the report. Here is the code on the form button
'Run Report
Dim stDocName As String
stDocName = "rptSelectedCustOpenRMA"
DoCmd.OpenReport stDocName, acPreview
'Close Popup
DoCmd.Close acForm, "frmSelectOpenRMACust"
On the report there is a PartNumber field, if the CustNumber from the form
=1 then the partNumber field should start with "NORB". So the data source
of the field is
=IIf(Forms!frmSelectOpenRMACust!cmboSelectOpenRMACust="1","NORB-" &
[fldPartNumber],[fldPartNumber])
and it works fine for the first page of the report. Second page is #Error
in that field. However if I remove the
'Close Popup
DoCmd.Close acForm, "frmSelectOpenRMACust"
The whole report is fine?????????????
It seems like its trying to get the info from the original form but by the
time the rpt prints its too late. I also tried to use the close event on the
report to close the form, NG
Sorry for the long explaination, hope it makes sense.
Joe
the report. Here is the code on the form button
'Run Report
Dim stDocName As String
stDocName = "rptSelectedCustOpenRMA"
DoCmd.OpenReport stDocName, acPreview
'Close Popup
DoCmd.Close acForm, "frmSelectOpenRMACust"
On the report there is a PartNumber field, if the CustNumber from the form
=1 then the partNumber field should start with "NORB". So the data source
of the field is
=IIf(Forms!frmSelectOpenRMACust!cmboSelectOpenRMACust="1","NORB-" &
[fldPartNumber],[fldPartNumber])
and it works fine for the first page of the report. Second page is #Error
in that field. However if I remove the
'Close Popup
DoCmd.Close acForm, "frmSelectOpenRMACust"
The whole report is fine?????????????
It seems like its trying to get the info from the original form but by the
time the rpt prints its too late. I also tried to use the close event on the
report to close the form, NG
Sorry for the long explaination, hope it makes sense.
Joe