Dim MyWhereCondition as string
' if value number use that
MyWhereCondition = "MyFieldNameInTable= " & me.FieldNameInTheForm
' if value text use that
MyWhereCondition = "MyFieldNameInTable= '" & me.FieldNameInTheForm & "'"
docmd.OpenReport "ReportName",,,MyWhereCondition
================================================
MyFieldNameInTable - Every report is bound (record source) to a table, when
you want to open the report on a specific record you need to filter the
report on a crtain value that you want to pass from the form.
So the field value in the form should correspond to a field in the report.
So basically the MyFieldNameInTable should be the name of the field in the
table that the report is bound to
=================================================
FieldNameInTheForm - The name of the field in the form that you want to get
the value from.
--
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.
Good luck