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

ENABLE DISABLE ENABLE Click events

Status
Not open for further replies.

lashwarj

IS-IT--Management
Nov 1, 2000
1,067
US
I have a check box that when clicked does the following

THISFORM.TEXT1.ENABLE=.T.

This works great but I want it so if the users unclicks the box it goes back to dissabled.
 
in the click event of the check box try:


THISFORM.TEXT1.ENABLED = !THISFORM.TEXT1.ENABLED
 
Put in clickevent of the check box. . .

IF somefield=.t. &&logic field in table
thisform.sometext1.Enabled=.f.
thisform.refresh
ENDIF

IF somefield=.f.
thisform.sometext1.Enabled=.t.
thisform.Refresh
endif

Hope this helps.

Bill
 
I'd suggest (assuming the checkbox it tied to a logical value):
THISFORM.TEXT1.ENABLED = this.value

Rick
 
THISFORM.TEXT1.ENABLE= IIF(THISFORM.CHECK1.VALUE=1,.T.,.F.)

Ed Please let me know if the suggestion(s) I provide are helpful to you.
Sometimes you're the windshield... Sometimes you're the bug.
smallbug.gif
 
eguy

>>THISFORM.TEXT1.ENABLE= IIF(THISFORM.CHECK1.VALUE=1,.T.,.F.)

I assume you meant THISFORM.TEXT1.ENABLED
 
mgagnon;

Does spelling count? [ponder]

Ed Please let me know if the suggestion(s) I provide are helpful to you.
Sometimes you're the windshield... Sometimes you're the bug.
smallbug.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top