Changing settings in a querry to print

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Using a2k, I currently have a form in my application that permits the user
to press a command button to run a query called "recent sales". This query
can be printed as well but I would like to give the option to the user of a
smaller font and smaller row width when printing.

I suspect the best way is with a command button from the form to temporarily
set the width and font size before printing but I don't know how to reference
the width and font size for the query.

Can anyone tell me how it's done?

Thx

Mgp
 
AFAIK, you can't control the parameters of how a query is printed directly,
but you can use the Open event of a report based on the query to do what you
want. Something like:

Dim varFontSize As Variant
Dim ctl As Control

varFontSize = Val(InputBox("Enter font size:", "Set Report Font Size"))
For Each ctl In Me.Controls
If ctl.ControlType = acTextBox Then
ctl.FontSize = varFontSize
End If
Next ctl

Hope that helps.
Sprinks
 
Back
Top