hi,
I am trying to preview a report of the current tracking number which is on the main form(main form name is:frmReviewReleaseLogWrapper) by using a command button. Each tracking number has different part numbers, so each tracking number has many records in the DB table (Depending upon the number of partnumbers, that is each partnumber has a record) I wrote the following code and it is not working, It is just displaying report name and column names and not the records.
Code is as follows:
Private Sub Command225_Click()
On Error GoTo Err_Command225_Click
Dim stDocName As String
DoCmd.OpenReport "rptEventLog", acPreview, , "[TrackingNumber] = Forms!frmReviewReleaseLogWrapper"
Exit_Command225_Click:
Exit Sub
Err_Command225_Click:
MsgBox Err.Description
Resume Exit_Command225_Click
End Sub