L1_Unit1.OnClick = ""

  • Thread starter Thread starter JethroUK©
  • Start date Start date
J

JethroUK©

Trying to disable checkbox single click event. tried:

L1_Unit1.OnClick = ""
L1_Unit1.OnClick = 0
L1_Unit1.OnClick is nothing

even tried:

L1_Unit1.OnClick = "sub donothing"

sub donothing
end sub

any clues?
 
Trying to disable checkbox single click event. tried:

L1_Unit1.OnClick = ""
L1_Unit1.OnClick = 0
L1_Unit1.OnClick is nothing

even tried:

L1_Unit1.OnClick = "sub donothing"

sub donothing
end sub

any clues?

To prevent a user from clicking a checkbox, set its Enabled property
to False. Or, use its BeforeUpdate property to negate anything that
they did:

Private Sub L1_Unit1_BeforeUpdate(Cancel as Integer)
L1_Unit1.Undo
Cancel = True
End Sub


John W. Vinson[MVP]
 
John Vinson said:
To prevent a user from clicking a checkbox, set its Enabled property
to False. Or, use its BeforeUpdate property to negate anything that
they did:

Private Sub L1_Unit1_BeforeUpdate(Cancel as Integer)
L1_Unit1.Undo
Cancel = True
End Sub
i dont want to disable it's function as a checkbox (can still be changed by
double-click) - just negate the (many accidental) single clicks - tried undo
& oldvalue but it errors on new/null record

the help page isn't very helpful & uses the example:

if control.onclick = "" then control.onclick = "[event proc]"

so from that i naturally assumed it's possible to set .onclick = ""

douglas suggested de/activating them (there's dozens) with a seperate
button, but that would be too inconvenient
 
Back
Top