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

Checkbox ticked, textbox value is shown

Status
Not open for further replies.

mflower

MIS
May 6, 2001
52
NZ
I've got a check box (chkboxPrint)and a text box (txtboxNote). What I want to do is show the text box value if the check box is ticked.

What's wrong with:

If chkboxPrint.Value = 1 then txtboxNote.Show = True?

Thanks:)
 
In the AfterUpdate event of your check box put this code:

txtboxNote.Visible = chkboxPrint

HTH Joe Miller
joe.miller@flotech.net
 
thanks for the code. i tried writing the code in the report but does not work, anyone knows how to use the same logic in the report. txtboxNote.visible = chkboxPrint if the chkbox is ticked in the report as well?
 
Use an iif statement to examine the the box by placing this the control source of a text box on the report:

=IIf([Forms]![MyFormName]![chkboxPrint]=-1,[Note],"")

What that statement does is look at chkboxPrint on [MyFormName] and see if it's yes (-1). If it's yes then it shows the field named [Note], otherwise it shows nothing.
Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top