Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to send one line to printer or report using VBA

Status
Not open for further replies.

sklambert

Programmer
Sep 15, 2003
31
US
I am posting this in a few Access forums to see if anyone has ideas. I need help with printing. I am writing a procedure to read and update records in a table. I want to read a record, print the value of a field, change the value of the field, then print the value of the field again. I want to also add comments with the values. I want to send each line to the printer as the code is executed. Alternatively, I need to know how to send each line to a report, then print the report at the end of code execution.

So I want to do this in code:

With rst
.MoveFirst
Do While Not .EOF
.Edit
Send "VEHICLE NUMBER " & the value of rst![VEHICLE NUMBER] to printer
Change the value of rst![VEHICLE NUMBER]
Send "CHANGED TO " & the new value of rst![VEHICLE NUMBER] to printer
.Update
.MoveNext
Loop
End With

Please, any help would be greatly appreciated!!! Thanks in advance!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top