Hi Debra.
Before you go further, check if you need a QuoteDetail table as well as as
your Quote table, so that one quote can contain many details (line items).
For an example of how that works, see the Orders and Order Details tables in
the Northwind sample database.
To print a copy of the quote for each bidder:
1. Create a query that contains all 3 tables, and drag the fields you need
for the report into the query design grid. Save.
2. Create a report based on this query.
3. In report design view, increase the height of the detail section so you
can fit all your fields with the layout you want.
4. Open the Sorting And Grouping Box (View menu). Select BidderID, and
choose Yes for the Group Header (lower pane of Sortin'n'Grouin' dialog).
Access adds the section to the report.
5. Right-click the BidderID Header (grey bar), and choose Properties. On the
Format tab of the Properties box, beside the Force New Page property, choose
Before Section. This gives you a new page for each one.
6. Save the report with a name such as "rptQuote".
That should give you a report that prints a page for each bidder. Now for
the button to print out these quotes:
1. On the form, add a command button with these properties:
Name cmdPrint
On Click [Event Procedure]
2. Click the Build button (...) beside the On Click property. Access opens
the code window.
3. Between the "Private Sub ..." and "End Sub" lines, enter:
Dim strWhere As String
If Me.Dirty Then 'Save record
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print.
MsgBox "Select a quote"
Else
strWhere = "QuoteID = " & Me.QuoteID
DoCmd.OpenReport "rptQuote", acViewPreview, , strWhere
End If
Enjoy.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
debraj007 said:
If nobody has told you this today, You're Brilliant! That worked
perfectly. Just one more question then I will leave you alone for today
.
From my quote form I would like to press a button to print out a quote (the
particular quote I've selected) and I would like 1 quote (each on a new
page) to print for each customer I selected in the drop down box, with each
customer company printing in the TO: field. How do I make this work?