Jumat, 31 Agustus 2012

Re: [MS_AccessPros] Problem with checkboxes randomly disappearing

 

Ok, I tweaked my statements and it is now working.

Here is what I used:

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

If [chkFailEyeMRR] = True Then
[chkPassEyeMRR].Visible = False
Else
[chkPassEyeMRR].Visible = True
End If

--- In MS_Access_Professionals@yahoogroups.com, "jfakes.rm" <jfakes@...> wrote:
>
> Crystal,
> I tried using the Load event, however, when the form opens, it is filtered so the checkboxes aren't always shown so I get and error "you entered an expression that has no value."
>
> John F
>
> --- In MS_Access_Professionals@yahoogroups.com, Crystal <strive4peace2008@> wrote:
> >
> > 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
> > ________________________________
> > From: jfakes.rm <jfakes@>
> > 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
>

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar