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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printpreview problem 1

Status
Not open for further replies.

Tom123456

Programmer
Apr 2, 2003
70
SE
Hello all!
I have a form with a checkbox and a printpreview button. How can I in the printpreview (when I have pressed the button) the value of the checkbox and the diside if a textfield should be shown or not.



- Tom
 
Hi

In the relavant section of the form, OnFormat event

If Forms!MyForm!MyCheckBox = True Then
MyTextBox.Visible = True
Else
MyTextBox.Visible = False
End If

Using your own form and control names of course

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
That worked just great!!, Thanks a lot!!. I got the answer to this question in less than 1 minute!!



- Tom
 
Hello again!

(Follow up question.)

The report read values from a table with 222 records. When I remove the textboxes I only want to show one page. How do I do?

- Tom
 
Hi

You mean you want to print only one record?

See the DoCmd.OpenReport syntax in help, you can set the unique identifier of the record within the docmd

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Thanks again, Ken!!

I found it and the solution was like you said:
DoCmd.OpenReport "REPORT_NAME", acViewPreview, "", "WHERE CONDITION"

- Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top