View Full Version : Report criteria by Form


MrAustin
12-21-2004, 05:51 AM
Hi all,

I am using the following code on a command button:

Private Sub cmdPrintTicket_Click()

DoCmd.OpenReport "rptPrintTicket", acViewNormal, , "[tick_id] = " & Me.tick_id.Value

End Sub

But when I run the code, it prompts me for "cust_id" which is another field on the form, and in the Tickets table. Any ideas why it is doing this?

Uncle Gizmo
12-21-2004, 11:41 AM
Open the report in design view and have a look to see if you have anything in Sorting and grouping Also have a look to see if you have anything in the filter.