Print Record

  • Thread starter Thread starter RML
  • Start date Start date
R

RML

I would like to be able to print a single record in my
form. Here is the code I'm currently using:

On Error GoTo Err_Command228_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.PrintOut acSelection
Exit_Command228_Click:
Exit Sub
Err_Command228_Click:
MsgBox Err.Description
Resume Exit_Command228_Click
End Sub

Obviously, from the wizard. It works fine but I would
like to be able to select a printer. Right now, it
simply goes to my deault printer and prints.

Thanks.
 
To print the current record, and give the user a chance to change the
printer I would use:


me.Refresh

docmd.OpenReprot "yourReportName",acViewPreview,,"id = " & me.id

What this means is that you need to make a report that looks like, or
displays the data as you want. Trying to print forms is a pain, and when you
start to do things like try and select a printer etc, it is even more of a
pain. So, build a nice report..and use that!

Forms = A thing you build for data input
Reports = A thing you use to send stuff to the printer!
 
Back
Top