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

Check box not updating? 1

Status
Not open for further replies.

EMJULIAN

Programmer
Aug 14, 2002
45
US
I have a checkbox in the 1st column of a grid. User selects the box (to select the record) then clicks a command button to execute code. In the code it resets the check box to .F. The only way I can get the check box to refresh in the grid (back to the .F. state), is to either click on any colum in the grid before clicking on the command button and running the code, or by clicking the command button 2x, the first time it doesn't update the check box, the second time it does. Any idea why the check box won't update???

Thanks,
Eve
 
Hi Eve,

Is column sparse = .F.?
Is the checkbox the current control?
Have you removed the textbox?
Is visible = .T. && I know this one sounds silly, if added programically this one can bite you.

Regards,

Mike
 
Yes, yes, yes and yes. :) Any other thoughts? I am thinking it has something to do with the focus not getting set off, or back on, or something like that. It's just one of those little things that is driving me crazy!

Thanks,
Eve
 
Aha! I found it. I have to set the focus off the check box and somewhere else on the grid before it would refresh.

Who knew?!

Thanks for you reply.

Eve
 
If you change the checkbox.Value this will reflect immediately, but is not the recommended approach. If you change the data the checkbox is bound to, then you need to refresh the control so the control reflects the data it is bound to.


_RAS
VFP MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top