Hi guys/girls,
Before, I had a quote form that would only allow the addition of one product to each quote. the following VBA allowed fields from the form to appear in their corresponding fields in a report:
Private Sub cmdPrint_Click()
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[ID] = " & Me.[ID]
DoCmd.OpenReport "MyReport", acViewPreview, , strWhere
End If
End Sub
I attempted to use this on my newest form that allows multiple products to each quote and while the report appears with no errors, nothing shows up in the fields.
Can anybody shed any light on this?
Thanks in advance