I try to print a single record from a form into a report with WHERE clause in DoCmd.OpenReport.
the Command look likes this. ( I pick this command method from +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
DoCmd.OpenReport "rptProd_Data", acViewPreview, , "[Item_Number] = Forms!"Add/Edit Product!Item_Number"
' "rptProd_Data" is my report
' "Item_Number" is a fieldname in the record as the primary key
' "Add/Edit product " is my form name
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The problem is when I click the Button, is came out "Enter Parameter Value" windows.
Please help to solve this problem.
Thanks before.
P2
the Command look likes this. ( I pick this command method from +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
DoCmd.OpenReport "rptProd_Data", acViewPreview, , "[Item_Number] = Forms!"Add/Edit Product!Item_Number"
' "rptProd_Data" is my report
' "Item_Number" is a fieldname in the record as the primary key
' "Add/Edit product " is my form name
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The problem is when I click the Button, is came out "Enter Parameter Value" windows.
Please help to solve this problem.
Thanks before.
P2