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!

Checkbox, where to put code

Status
Not open for further replies.

metron9

Programmer
Mar 5, 2002
94
US
Have a from with checkboxes the checkbox control source for each checkbox is linked to a field in a table.

When the user clicks the checkbox I need to update another field in the data table to reflect the change. I will read the .t. or .f. linked field in the table. The question is where should I put the code to update the other field. If I put it in the click method I dont know if the code runs first or if the logical linked field gets set first.

 
HI,

You try to put in the Interactive Change event of the Checkbox. Otherwise try to use Valid Event...

HTH,

Suggestions Invited...

gchandrujs [sunshine]
 
I put the following code in each CLICK event
changing the bit number for each checkbox and it works great.

if (<logical field>)
replace bitflags with bitset(bitflags,0)
else
replace bitflags with bitclear(bitflags,0)
endif
 
I would sugest the Interactive Change event. Attitude is Everything
 
metron9

Putting your code in the .Click() event means you will not be able to change the value with the keyboard, hence the advice to use the .InterActiveChange() event instead. HTH

Chris [pc2]
 
I will try that tonight.
The user is not allowed to change this field, The user can change only the check boxes. The field (bitflags) is an indexed field that stores the .t. or .f. state of all of the check boxes for that record. I am going to install the MSDM Help file tonight. I hope it has explinations for all of the methods in a checkbox. How else would I know to use the interactivechange event, I simply do not have any documentation on it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top