Selection highlighted when printed

P

poppet

Setting up a form, selected text when highlighted from list box does not show
up when printed
 
S

Sprinks

Poppet,

Access provides minimal support for printing forms. I use it solely for
application documentation.

Define a report instead, and provide the user with a command button to print
the report, using the optional Where clause of the OpenReport method to
filter the recordset to the current record:

Dim stDocName As String

stDocName = "YourReport"
DoCmd.OpenReport stDocName, acNormal, , "[YourPrimaryKey] = " &
Me![FormControlWithPrimaryKey]

The above code assumes the primary key is numeric. If it is text, you'll
need to add single quotes around the control value:

Dim stDocName As String

stDocName = "Customers"
DoCmd.OpenReport stDocName, acNormal, , "[Customer ID] = " & "'" &
Me![Customer ID] & "'"

Hope that helps.
Sprinks
 
Top