Hello! I have a Main form with a subform attached. I have a few unbound text boxes in that subform so people can type in and print information on the form. However I can not get it to print the subform. I also need it to print that single record. I built a report as suggest, but I still cannot get my command button show me just that one record associated with that subform. Here is the code I am using:
Private Sub Command175_Click()
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[Repetitive # or Name assigned] = """ & Me.[ Repetitive # or Name assigned] & """"
DoCmd.OpenReport "Repetitive Listing", acViewPreview, , strWhere
End If
End Sub
When I click the button it say it does not recognize [Repetitive # or Name assigned].
Any suggestions??