bill201
asked on
how to send a value from a form to a reprt in access 2013
hi
i have a veriable in a form that contain some sql string and i want to send this value to a report recordsorce and then open this report based on this sql source
i wrote this code in the report
and in the form i have this code
thanks a lot
i have a veriable in a form that contain some sql string and i want to send this value to a report recordsorce and then open this report based on this sql source
i wrote this code in the report
Public Sub ControlReport(a As String)
If Not IsNull(a) And Not a <> "" Then
Me.RecordSource = a
Me.Requery
End If
End Sub
and in the form i have this code
DoCmd.OpenReport "ListProductrsReport", acViewPreview
reports!ListProductrsReport!ontrolReport (sqlString)
but i don't can to compile the code on the form, what is the problem with my code?thanks a lot
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER