Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Filtering a form upon opening it

$
0
0
Hi guys,

I have a report that I use in conjunction with a form to create customer invoices. However when I open the report it shows me every record, which in turn shows me every invoice that has been created, however I would like it so when I open it up it asks for the invoice number.
I have seen this code (Modified for my own fields) and to put it in the WHERE condition of openreport:
DoCmd.OpenReport "rptCustomerInvoice", , , "InvoiceNumber=" & Me.InvoiceNumber

However I have no idea what openreport is or where to put this code.
I have also noticed on a form, when I open it, it already has the fields set to the first record in the table it's linked to what would I have to put into the "OnLoad" section of the form property sheet to make it clear (I currently have a button for this)

Viewing all articles
Browse latest Browse all 13329

Trending Articles