why won't this work?
I have a form which has a text box: forms!frmCaseLo g!tboCaseID the RecordSource for the form is tblCaseLog with the field [lngCaseID]
I would like to print a report with details entered into the form.
For the report RecordSource I have created a query "qryCurrentCase Info" which has in the criteria for [lngCaseID] the control above on the form "frmCaseLog "
I have a command button [cmdPrint] to print the report with the code
If I debug.print the control I get the Case ID value but I cannot get the query to use the Case ID value as the criterion for the report.
what gives? am I missing something?
thanks a bunch!
/jh
I have a form which has a text box: forms!frmCaseLo g!tboCaseID the RecordSource for the form is tblCaseLog with the field [lngCaseID]
I would like to print a report with details entered into the form.
For the report RecordSource I have created a query "qryCurrentCase Info" which has in the criteria for [lngCaseID] the control above on the form "frmCaseLog "
I have a command button [cmdPrint] to print the report with the code
Code:
Private Sub cmdPrint_Click()
Dim stDocName As String
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
With Forms!frmUrgentTriage1
.tbo2CaseID.SetFocus
.tbo2CaseID.Requery
.Repaint
End With
stDocName = "Report1"
DoCmd.OpenReport stDocName, acNormal
End Sub
what gives? am I missing something?
thanks a bunch!
/jh
Comment