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

i have a form with 5 tick boxes on

Status
Not open for further replies.

ghayman73

Technical User
Jul 3, 2002
55
FR
i have a form with 5 tick boxes on it.
I am trying to make the visable property false if the number in another text box is more than a certain figure.

I am just trying it on one tick box at the moment but having no joy

this is what i have so far:

Private Sub Dirt_Cheap____Enter()

If Me![count] > 14 Then
Me![Dirt Cheap_()].Visible = False

End Sub

i get a compiler error

thanks in advance
 
firstyly put it underafterupdate event

and paste this

text2 = name of ur text box
check0 = name of ur checkbox

Private Sub Text2_AfterUpdate()
If Me.Text2.Value > 14 Then
Me.Check0.Visible = False
Else
Me.Check0.Visible = True
End If
End Sub
 
using this code

Private Sub Dirt_cheap_keyword_AfterUpdate()
If Me.how_many.Value > 14 Then
Me.Dirt_cheap_keyword.Visible = False
Else
Me.Dirt_cheap_keyword.Visible = True
End If
End Sub

however it dooes not hide the tick box but if i click it it says "you can not hide a field with has focus" so it is trying
but how can i do it when the form loads

also there are more than one record in the form over 10,000 does this make a diffrence

thanks again
grant
 
for the form loads i would call the code...

call Dirt_cheap_keyword_AfterUpdate

now for the other problem i am not sure maybe try

i am not sure about the other error, is the tick box on a table? or a tickbox on the form??
 
on a form

the form runs off a table there are no quireies as yet
 
Since "you can not hide a field with has focus", try first setting the focus to another field before you run your code.

Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top