Using Reports to Invoice???

G

Guest

I have created a report formatted to appear as an invoice. It pulls all of
the Invoice details from a single query. Looks great, but the user has to be
able to view/print a range of invoices (not just one at a time) without
having to know the specific invoice number each time i.e.; search for
invoices for a particular billing cycle, print the ones they just entered,
print a range, filter by customer, etc. Right now it is calling up the
invoice by a single invoice number that the user enters...

Any suggestions or would it just be easier to try MailMerge?
 
D

Duane Hookom

I would create a form with a bunch of controls that allows users to select
the date ranges or any other criteria. Then use code to build a "where"
clause that can be used in the DoCmd.OpenReport method. For instance:

Dim strWhere as String
strWhere = "1=1 "
If Not IsNull(Me.txtStartDate) Then
strWhere = strWhere & " And [InvoiceDate] >=# & _
Me.txtStartDate & "# "
End If
If Not IsNull(Me.txtEndDate) Then
strWhere = strWhere & " And [InvoiceDate] <=# & _
Me.txtEndDate & "# "
End If
'... more similar code
DoCmd.OpenReport "rptInvoice", acPreview, , strWhere
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top