go away! (1 Viewer)

sphere

Registered User.
Local time
Today, 14:28
Joined
May 21, 2001
Messages
19
I have a text box that pops up when i check a certain box.
if there's a record that has data in the pop up box and i create a new record... i still get that blank pop up box (when it shouldn't be cuz the check box isn't marked)
Basically i have to check the box, then uncheck it if i want that text box to go away.
i don't want to do this, the text box should ONLY appear when i check.
That text box needs to go away when i click on new record-

warning: woman on PMS, this is really getting on my nerves!

appreciate the help =)
 

Peter Paul

Registered User.
Local time
Today, 14:28
Joined
Jan 1, 2000
Messages
82
With your disclaimer, I am hoping that this will work for you.

set the Visible property for the text box to False

In the After Update property of the check box
put in

If True Then
Me.[Textboxnamehere].Visible = True
Else Me.[Texboxnamehere].Visible = False
End If

I think that will work for you. If it doesn't, well eat some chocolate or something.

Good luck,
Peter
 
R

Rich

Guest
It should be
If Me.YourChBoxName = True Then
Me.Textboxnamehere.Visible = True
Else Me.Texboxnamehere.Visible = False
End If

And aspirin works well.
 

sphere

Registered User.
Local time
Today, 14:28
Joined
May 21, 2001
Messages
19
thanx guys but this is how i have it already!
the problem is that when there's data in that box that can be invisible, fine the box is visible. but as soon as i click on new record, the box is still visible when by default it should be gone.
i've already set the default to the check box = 0
isn't there a cure for this??

ps- i'm already cured

thanx again
 

sphere

Registered User.
Local time
Today, 14:28
Joined
May 21, 2001
Messages
19
correction to quote above..
..."fine, the box is invisible"...
 

Peter Paul

Registered User.
Local time
Today, 14:28
Joined
Jan 1, 2000
Messages
82
How big is this thing? Can you send it to me?

Peter
 

AlanS

Registered User.
Local time
Today, 10:28
Joined
Mar 23, 2001
Messages
292
Put something like this in the Form_Current event procedure:

TextBox1.Visible = Not(Me.NewRecord) and CheckBox1

That will hide the textbox unless you are on a pre-existing record AND the checkbox is selected. To handle a change in the state of the checkbox while you are editing either a new or pre-existing record, put the following code in the CheckBox1's AfterUpdate event procedure:

TextBox1.Visible = CheckBox1

Hope this helps.
 

Users who are viewing this thread

Top Bottom