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

controllling text boxes with a text box 1

Status
Not open for further replies.

kpryan

Technical User
Aug 24, 2005
282
US
Hi all,
I have a text box that when it has a certain text in it that other text boxes will change background.

I did try this, but not very successful

If textbox 1 = "paid" then
textbox2.background = 256 ( or other colour)
else
textbox2.background = 0

end if.

How can I get this to work.

Many thanks,

KP



 
Are you using a continuous form or a single form? What event did you use?
 
Hi Remou
Its a continuous form and I put this on the 'on load event'. So that when the form is opened it will show certain records.

many thanks,

Kp
 
You need to use Conditional Formatting for a continuous form.
 
Hi Remou,
Yes I have tried conditional formatting, but not sure how to write the code.
If I was to use a checkbox then I could write eg:
[chk] = true and then apply a background colour.

But how do I use a text box set with a certain text, ie "paid" to use the same color background.

KP
 
Conditional formatting is an item on the menu (design view). Is that where you are looking?
 
Hi remou,
Yes I know where the conditional formating is. But I dont know how to write the expression to get it to work.

Many thanks,

KP
 
You can use:

Expression Is [TextBox1]="Paid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top