Jumat, 31 Agustus 2012

Re: [MS_AccessPros] Problem with checkboxes randomly disappearing

 

Hi John,

perhaps you want to use the form LOAD event -- this fires one time, when the data is loaded.  The Current event is triggered upon landing on another record, or a new record

... but rather than doing this, why don't you use option buttons instead of checkboxes?  That way they become mutually exclusive automatically :)

anyway, there is often a better way than using checkboxes ... for instance, store a date/time, and a result like Pass or Fail

Warm Regards,
Crystal

Learn Access on YouTube
http://www.YouTube.com/LearnAccessByCrystal

 *
   (: have an awesome day :)
 *

________________________________
From: jfakes.rm <jfakes@rocketmail.com>
To: MS_Access_Professionals@yahoogroups.com
Sent: Friday, August 31, 2012 8:32 AM
Subject: [MS_AccessPros] Problem with checkboxes randomly disappearing

I had an issue with two checkboxes randomly disappearing on a form in MS Access 2003.  What I am trying to do is if a person passes an eye exam, the chkPassEyeMRR is checked so I don't want to see the chkFailEyeMRR checkbox.

Below is the code I am using in the "On Current" event. 

'Hides checkboxes if one of the other check boxes are checked.
    If [chkPassEyeMRR] = True Then
        [chkFailEyeMRR].Visible = False
            ElseIf [chkFailEyeMRR] = True Then
            [chkPassEyeMRR].Visible = False
            Else
                [chkPassEyeMRR].Visible = True
                [chkFailEyeMRR].Visible = True
        End If

When I open the form, the pass or fail checkbox displays properly.  However, as I move from record to record, the checkboxes randomly disappear and reappear. 

I have similar code for different controls on a separate tab on the same form and that code works and the textboxes display properly.

Any idea what is going on and how I can fix the issue?

John F

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar