I have a form with a button. I have an existing report.
When the form button is clicked I want to print a single A4 page that relates exclusively to the customer on the Form. The field CustomerID is on both the Form and the Report.
I am struggling with the "WHERE" clause. See cust and paste below.
I want one record on the report
...where the CustomerID on the form = the Customer ID on the report
(I raised this query earlier today in a more confusing manner!)a
Private Sub rptOrderConfirmation_Click()
Dim sWhere As String
'****** sWhere = "[CustomerID] ='" & CustomerID & "';"
DoCmd.OpenReport "rptOrderDetails", acViewPreview, , sWhere