Tick Box question - can it be done

benjee

Personal Jesus
Local time
Today, 16:19
Joined
Mar 19, 2003
Messages
53
Hello,

When you tick a 'tick box' is it possible that an OnClick function can create other tick boxes with further options. (similar to layers in JSP, JAVASCRIPT code).

For example, if i tick box A, can this event trigger a function that displays three other tick boxes B, C, D?

A bizzar question but could prove very valuable!

Cheers B
 
It is bizzare but possible.

Set chkB, C & D to invisible....

chkA AfterUpdate....

if chkA=True Then
chkB.Visible=True
chkC.Visible=True
chkD.Visible=True
Else
chkB.Visible=False
chkC.Visible=False
chkD.Visible=False
End if

Not sure if that's what you want.
 
Right i will try that.

Yeah basically im designing a system, and one of the tick boxes asks 'are you male' for example

If the user ticks the box i want two more tick boxes to appear adjacent to the original one with the options (made up): -

1. are you between 40 - 50yrs,
2. are your eyes blue.

If the box is not ticked nothing happens.

cheers
 
Hello,

Tried implementing your code KevinM but keep on getting an error when the Else statement kicks in.

Both the Demolition & ExistingMaterial tick boxes are fields in a table. I set the ExistingMaterial to invisible also.

Private Sub Demolition_AfterUpdate()
If chkDemolition = True Then
chkExistingMaterial.Visible = True
'chkC.Visible = True
'chkD.Visible = True
Else
chkExistingMaterial.Visible = False <= Debug error here
'chkC.Visible = False
'chkD.Visible = False
End If
End Sub

Any ideas?
 
When i open the form and click on the tick box it asks me to debug the code, and highlights the code: -

chkExistingMaterial.Visible = False
 
Check your spelling of the tick box names with those in the code
 
its a weird one,

all the names match, it wouldnt be anything to do with the label would it?

I have tried setting both the tick box and its companion label to invisible but still no luck. Also used OnClick rather than AfterUpdate.

Do i need to add any code to the tickbox i want to make visible i.e its AfterUpdate property?

BEN
 
SORTED,

panic over fixed it.:o

a spelling mistake! Such a simple thing.

Thanks for the patience KevinM
 

Users who are viewing this thread

Back
Top Bottom