Printing an invoice

S

Sparky

I have order management form from which I select a record in an
orders table. I then want to open an invoice form using a button on
the order management form , enter some text in an unbound text box on
the invoice form and print. My problem is how do I limit or lock the
invoice form to just the one record?

Hope this makes sense! Thanks

Sparky
 
J

Jeff Boyce

Sparky

Forms are great for displaying info, but reports are designed for printing
it.

Add a command button to your form (<Print Me>). "Behind" that button, add
something like:

DoCmd.OpenReport "YourReportName",...YourID = Me!txtYourIDControlName

(your syntax will vary!)

The general idea is to open a report limited (using a filter or a WHERE
clause) to the ID of the record showing on the form.

To get your report to "use" the unbound info typed into the form, use
something like:

=Forms![YourFormName]![YourUnboundControlName]

in your report to point back to the form.
 
Top