Check Box to control Text Box

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
 
A

Adam Milligan

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

me.yourtextbox.visible=me.yourcheckbox

Adam
 
B

Bob V

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
 
A

Adam Milligan

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
 
A

Adam Milligan

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top