Report question. (1 Viewer)

voidcranium

Registered Something.
Local time
Yesterday, 19:05
Joined
Oct 29, 2006
Messages
175
I need to know if this can be done.

I have a form that has a print button that prints a printout with all the info for the current record.
What I want to know is, if I can make certain text boxes on the printout NOT show up if a check box on the form is checked.

ei:
If chkBoxOne.checked then
textBoxOne.visible = false
End IF

Do I add code to the report or the form?

Thanks
 

boblarson

Smeghead
Local time
Yesterday, 17:05
Joined
Jan 12, 2001
Messages
32,059
If the form is going to be open when the report is open, just use code on the report to refer to the form.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 01:05
Joined
Sep 12, 2006
Messages
15,662
so, as bob says

one way is

textboxone.visible = forms("myform")!chkBoxOne = true
(or false, depending how you want it!)


note that there is no checked property
a yes no box is either true or false
 

voidcranium

Registered Something.
Local time
Yesterday, 19:05
Joined
Oct 29, 2006
Messages
175
Thanks for the help.
I am having one little problem so far.

If I put this code in the Private Sub Report_Open, then the printout won't print - Nothing happens.
txtPerfUp.Visible = False
if I comment out that line then it prints.
I have over 20 labels and text boxes and they all work except that one box.
Hmm, have any idea?

So far thats the only problem I am having.

Thanks
 

voidcranium

Registered Something.
Local time
Yesterday, 19:05
Joined
Oct 29, 2006
Messages
175
I found the problem.
Whoever set this up the first time put a space in between Perf and Up.

everything is working great now.

thanks
 

boblarson

Smeghead
Local time
Yesterday, 17:05
Joined
Jan 12, 2001
Messages
32,059
Good to hear you tracked down the problem. :)

 

Users who are viewing this thread

Top Bottom