I have a form which has a text box: forms!frmCaseLog!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 "qryCurrentCaseInfo" 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
Expand|Select|Wrap|Line Numbers
- 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