OnDataChange Question

From: Debbie Erickson (debianne_at_earthlink.net)
Date: 01/30/04

Date: Thu, 29 Jan 2004 16:22:23 -0800

Hello. I have a data-aware checkbox on a form. When the application gets a
new record, or when the user clicks on the checkbox, I want to toggle a
tabsheet from visible/invisible. So basically what I want to do is this:
    if MyScreenField.checked then
         MyTabSheet.TabVisible:= False
          MyTabSheet.TabVisible:= True;

I put this code in the OnDataChange event but it does not work if I use the
mouse to toggle the checkbox. As I traced the program logic, it seems that
the event is fired before the form thinks it is checked. So I tried to
check the underlying dataset by using this in the ondatachange:
     if datasource1.dataset.fieldbyname('MyField').Value = 'Y' but it STILL
does not work in every case.

I'm just not checking the right conditions at the proper time. Will someone
please tell me the proper way to do this?

Debbie Erickson