D
Don
I have a form (Main form & Subform) that I would like to print the current
records on the subform in a report. The following is the code I have but it
does not select only the [CDCNum] current on the form, it prints all records
regardless of the current record.
Private Sub Command107_Click()
On Error GoTo Err_Command107_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Tasks by Assigned To"
stLinkCriteria = "[CDCNum] =" & "'" & Me![Project Name] & "'"
DoCmd.OpenReport stDocName, acPreview, stLinkCriteria
Exit_Command107_Click:
Exit Sub
Err_Command107_Click:
MsgBox Err.Description
Resume Exit_Command107_Click
End Sub
Any ideas why this is not working?
records on the subform in a report. The following is the code I have but it
does not select only the [CDCNum] current on the form, it prints all records
regardless of the current record.
Private Sub Command107_Click()
On Error GoTo Err_Command107_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Tasks by Assigned To"
stLinkCriteria = "[CDCNum] =" & "'" & Me![Project Name] & "'"
DoCmd.OpenReport stDocName, acPreview, stLinkCriteria
Exit_Command107_Click:
Exit Sub
Err_Command107_Click:
MsgBox Err.Description
Resume Exit_Command107_Click
End Sub
Any ideas why this is not working?