G
Guest
I have what I believe is an update problem that I cannot figure out. I have
a main form (fGeneralInfo) with an autonumber field JobNumber. There is a
subform (fStatus) with a date field (Incoming). Once user leaves main form,
the first field is the Incoming field where a date is entered. After
entering date, a report should be generated based on the JobNumber of the
main form. It worked for a short while, but then began printing blank pages
on the report. Here is the code for the Incoming field:
Private Sub Incoming_AfterUpdate()
On Error GoTo Err_Incoming_AfterUpdate
If [Forms]![fGeneralInformation]![CustomerName] = "Lyondell" Then
DoCmd.OpenReport "rRMABatchRegularLyondell", , , "JobNumber=" &
[Forms]![fGeneralInformation]![JobNumber]
Else
DoCmd.OpenReport "rRMABatchRegular", , , "JobNumber=" &
[Forms]![fGeneralInformation]![JobNumber]
End If
Exit_Incoming_AfterUpdate:
Exit Sub
Err_Incoming_AfterUpdate:
MsgBox Err.Description
Resume Exit_Incoming_AfterUpdate
End Sub
Here is requery code from subform - I've tried both and it still won't work
Private Sub Form_Activate()
[Forms]![f*GeneralInformationWITHQUOTE]![JobNumber].Requery
End Sub
Private Sub Form_AfterUpdate()
[Forms]![f*GeneralInformationWITHQUOTE]![JobNumber].Requery
End Sub
I've changed this around so much trying to get it to work and am very
frustrated. Any help is greatly appreciated!!
Thanks,
Phisaw
a main form (fGeneralInfo) with an autonumber field JobNumber. There is a
subform (fStatus) with a date field (Incoming). Once user leaves main form,
the first field is the Incoming field where a date is entered. After
entering date, a report should be generated based on the JobNumber of the
main form. It worked for a short while, but then began printing blank pages
on the report. Here is the code for the Incoming field:
Private Sub Incoming_AfterUpdate()
On Error GoTo Err_Incoming_AfterUpdate
If [Forms]![fGeneralInformation]![CustomerName] = "Lyondell" Then
DoCmd.OpenReport "rRMABatchRegularLyondell", , , "JobNumber=" &
[Forms]![fGeneralInformation]![JobNumber]
Else
DoCmd.OpenReport "rRMABatchRegular", , , "JobNumber=" &
[Forms]![fGeneralInformation]![JobNumber]
End If
Exit_Incoming_AfterUpdate:
Exit Sub
Err_Incoming_AfterUpdate:
MsgBox Err.Description
Resume Exit_Incoming_AfterUpdate
End Sub
Here is requery code from subform - I've tried both and it still won't work
Private Sub Form_Activate()
[Forms]![f*GeneralInformationWITHQUOTE]![JobNumber].Requery
End Sub
Private Sub Form_AfterUpdate()
[Forms]![f*GeneralInformationWITHQUOTE]![JobNumber].Requery
End Sub
I've changed this around so much trying to get it to work and am very
frustrated. Any help is greatly appreciated!!
Thanks,
Phisaw