G
Guest
this is my code:
Private Sub Command26_Click()
Dim stDocName As String
Dim search As String
search = "SELECT asbestosbridge.* FROM asbestosbridge;"
stDocName = "cbin"
DoCmd.OpenReport stDocName, acViewPreview
Reports![cbin].RecordSource = search
End Sub
It is telling me I can't set the recordsource for print preview. Is there a
way to do this? I would like to use code so I can have a form for user
criteria selection.
Private Sub Command26_Click()
Dim stDocName As String
Dim search As String
search = "SELECT asbestosbridge.* FROM asbestosbridge;"
stDocName = "cbin"
DoCmd.OpenReport stDocName, acViewPreview
Reports![cbin].RecordSource = search
End Sub
It is telling me I can't set the recordsource for print preview. Is there a
way to do this? I would like to use code so I can have a form for user
criteria selection.