Simulate blank text box

Transentient

Registered User.
Local time
Today, 16:23
Joined
Sep 25, 2007
Messages
31
I need to be able to simulate the blanking and un-blanking of a text box. The action is executed from another form. I have tried changing the font colour by code, but I get an error that tels me this is not possible.

Also tried placing a blank over the text box, but text box comes to the front.

Any suggestions?

thanks
 
Do you need just the contents to blank, or do you just want to make the whole text box invisible? What is the purpose of doing this?
 
From somewhere within the Form you are currently in. The TextBox on the second Form must have it's Back Style property set to Normal:

Code:
Dim FntColor As Long

[COLOR="DarkGreen"]'Store the current Font Color[/COLOR]
FntColor = Forms("[COLOR="Red"][I]myOtherForm[/I][/COLOR]").[COLOR="Red"][I]myTextBox[/I][/COLOR].ForeColor

[COLOR="DarkGreen"]'Change the Font Color to match the BackColor of 
'the TextBox...[/COLOR]
Forms("[COLOR="Red"][I]myOtherForm[/I][/COLOR]").[I][COLOR="Red"]myTextBox[/COLOR][/I].ForeColor = Forms("[COLOR="Red"][I]myOtherForm[/I][/COLOR]").[COLOR="Red"][I]myTextBox[/I][/COLOR].BackColor

[COLOR="DarkGreen"]'To set the TextBox Font color back to normal again...[/COLOR]
Forms("[COLOR="Red"][I]myOtherForm[/I][/COLOR]").[I][COLOR="Red"]myTextBox[/COLOR][/I].ForeColor = FntColor

.
 

Users who are viewing this thread

Back
Top Bottom