Check Box to control Text Box

  • Thread starter Thread starter Bob V
  • Start date Start date
B

Bob V

I have a Check Box on my Main Form [Overdue, Yes/No]
I want this text box only to show on my report if [Overdue] is ticked
My text Box:
[tbOD] =IIf([tbOverDueAmount]>1,DLookUp("OverdueMessage","tblCompanyInfo"))

Thanks for any help.........Bob
 
In your checkbox's on change event put the following line of code:

me.yourtextbox.visible=me.yourcheckbox

Adam
 
Thanks Adam but a check box does not have a On Change
event!............Thanks Bob

Adam Milligan said:
In your checkbox's on change event put the following line of code:

me.yourtextbox.visible=me.yourcheckbox

Adam


Bob V said:
I have a Check Box on my Main Form [Overdue, Yes/No]
I want this text box only to show on my report if [Overdue] is ticked
My text Box:
[tbOD]
=IIf([tbOverDueAmount]>1,DLookUp("OverdueMessage","tblCompanyInfo"))

Thanks for any help.........Bob
 
That line of code should also go in your form's on current event as well. It
is worth pointing out that if you uncheck the checkbox, only the text box
disappears. Any data will still be in the field/table.

Adam Milligan said:
In your checkbox's on change event put the following line of code:

me.yourtextbox.visible=me.yourcheckbox

Adam


Bob V said:
I have a Check Box on my Main Form [Overdue, Yes/No]
I want this text box only to show on my report if [Overdue] is ticked
My text Box:
[tbOD] =IIf([tbOverDueAmount]>1,DLookUp("OverdueMessage","tblCompanyInfo"))

Thanks for any help.........Bob
 
oops! I meant "After Update". Sorry.

Bob V said:
Thanks Adam but a check box does not have a On Change
event!............Thanks Bob

Adam Milligan said:
In your checkbox's on change event put the following line of code:

me.yourtextbox.visible=me.yourcheckbox

Adam


Bob V said:
I have a Check Box on my Main Form [Overdue, Yes/No]
I want this text box only to show on my report if [Overdue] is ticked
My text Box:
[tbOD]
=IIf([tbOverDueAmount]>1,DLookUp("OverdueMessage","tblCompanyInfo"))

Thanks for any help.........Bob
 
Back
Top