Re: Re-setting combo boxes
- From: "Bill" <stanton@xxxxxxx>
- Date: Fri, 09 Feb 2007 18:50:13 GMT
Here's the code that runs where I'm having trouble:
(If I put a breakpoint at the "End With" and step
through the code, all the combo boxes "clear".
However, if I let the code run unabated, only
the combo that had the focus "clears", AND not
always that one.)
==============================================
Public Function MajCatSelect(strCategory As String)
Dim strTemp As String
strTemp = "lbl" & strCategory
If strMajCat = strTemp Then Exit Function
With Me
.CmboSubCat1 = Null
.CmboSubCat2 = Null
.CmboSubCat3 = Null
.CmboSubCat4 = Null
End With
Un_Highlight (strMajCat)
LCaseCat (strMajCat)
strMajCat = strTemp
Highlight (strMajCat)
UCaseCat (strMajCat) 'Set major category label to upper case
End Function
==============================================
What's going on here?
Bill
"Klatuu" <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7E368897-2066-4BA2-B8C7-16D1795EDD34@xxxxxxxxxxxxxxxx
You will have to explicitly clear all the combos:
With Me
.Combo1 = Null
.Combo2 = Null
End With
--
Dave Hargis, Microsoft Access MVP
"Bill" wrote:
(PS)
I see that whichever of the combo boxes has the
focus that it will clear, but the others won't.
Bill
"Bill" <stanton@xxxxxxx> wrote in message
news:F0Uyh.22416$yx6.19763@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have several combo boxes that have values
selected under certain conditions. When the
user makes a certain change in those conditions,
most all of the combo boxes need to revert to
the same state they're in when the form opens,
namely blank. In the event code that gets
control with such a change, I have the following
form of code: (several such)
cmboMyCombo = Null
Sometimes the boxes clear and sometimes they
don't. What do I need to do to insure that they
always clear? I suppose if I Requery each one
that would do the trick, but intuitively that seems
excessive.
Bill
.
- Follow-Ups:
- Re: Re-setting combo boxes
- From: Klatuu
- Re: Re-setting combo boxes
- References:
- Re-setting combo boxes
- From: Bill
- Re: Re-setting combo boxes
- From: Bill
- Re-setting combo boxes
- Prev by Date: RE: Stuck, Need Help w/ Code
- Next by Date: Re: SQL TOP 50,000 Help
- Previous by thread: Re: Re-setting combo boxes
- Next by thread: Re: Re-setting combo boxes
- Index(es):
Relevant Pages
|