John,
SetProperty did it, Selected "value" and made it "Null".
Thanks,
Bill
-----Original Message-----
From: John Viescas [mailto:john@viescas.com]
Sent: Sunday, January 1, 2012 11:00 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: RE: [MS_AccessPros] Re: Cascading Combo Box
Bill-
Use SetValue to set the combo box to Null.
John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Waco, Texas <yee haw>)
-----Original Message-----
From: mailto:MS_Access_Professionals%40yahoogroups.com
[mailto:mailto:MS_Access_Professionals%40yahoogroups.com] On Behalf Of
mailto:Bill.Singer%40at-group.net
Sent: Sunday, January 01, 2012 9:51 PM
To: mailto:MS_Access_Professionals%40yahoogroups.com
Subject: Re: [MS_AccessPros] Re: Cascading Combo Box
John,
I will check out the book.
I have access 2010. Which brings me to an issue. I have a combo box that looks
up a record on a form. The combo box in Access 2010 goes to a "After update"
macro and finds the record on my form. I want to clear the combo box after the
record is found so as not to confuse the user. I have an older 2007 database
that clears a combo box but it go to the code builder. I cannot figure out how
to modify the 2010 macro to clear the combo box. Is that possible. Should I
start a new thread on this?
Thanks,
Bill
-----Original Message-----
From: John Viescas [mailto:mailto:john%40viescas.com]
Sent: Sunday, January 1, 2012 10:33 PM
To: mailto:MS_Access_Professionals%40yahoogroups.com
Subject: RE: [MS_AccessPros] Re: Cascading Combo Box
Bill-
You don't say which version of Access you're using or the types of applications
you're building. If you're building web apps with 2010, then macros are the way
to go. If you're building desktop apps in any version, then you should learn
VBA. I recently recommended this book to someone else on this forum:
http://www.amazon.com/Learn-Access-2003-Smart-Method/dp/0955459907?tag=viescacon
sulinc
I haven't read that book personally, but it has excellent reviews on Amazon.
Although it's for version 2003, what you'll learn should be applicable to all
versions.
John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Waco, Texas <yee haw>)
-----Original Message-----
From: mailto:MS_Access_Professionals%40yahoogroups.com
[mailto:mailto:MS_Access_Professionals%40yahoogroups.com] On Behalf Of
mailto:Bill.Singer%40at-group.net
Sent: Sunday, January 01, 2012 8:15 PM
To: mailto:MS_Access_Professionals%40yahoogroups.com
Subject: Re: [MS_AccessPros] Re: Cascading Combo Box
John,
Thanks, I will give that a try.
I do not understand the question - "why are you using macros?"
I use them because they are more menu driven. I understand them more than the
"code builder"
If you had a source for learning how to use the "code Builder" I would be
interested.
Thanks,
Bill
MN
-----Original Message-----
From: John Viescas [mailto:mailto:john%40viescas.com]
Sent: Sunday, January 1, 2012 07:38 PM
To: mailto:MS_Access_Professionals%40yahoogroups.com
Subject: RE: [MS_AccessPros] Re: Cascading Combo Box
Bill-
Why are you using macros? Use the Requery action in a macro and point to the
second combo box in the Control Name parameter. Run the macro from both the
Form's Current event and the first combo's After Update event.
John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Waco, Texas <yee haw>)
-----Original Message-----
From: mailto:MS_Access_Professionals%40yahoogroups.com
[mailto:mailto:MS_Access_Professionals%40yahoogroups.com] On Behalf Of
mailto:Bill.Singer%40at-group.net
Sent: Sunday, January 01, 2012 5:51 PM
To: mailto:MS_Access_Professionals%40yahoogroups.com
Subject: Re: [MS_AccessPros] Re: Cascading Combo Box
John,
I would be interested in how to do an update on the second combo box based on
the "after update" property of the first combo box. That would seem to be a good
option. I use the Macro builder. Would I still use the "RefreshRecord" option?
Thanks,
Bill
MN snowing and blowing.
-----Original Message-----
From: John Viescas [mailto:mailto:john%40viescas.com]
Sent: Sunday, January 1, 2012 01:28 PM
To: mailto:MS_Access_Professionals%40yahoogroups.com
Subject: RE: [MS_AccessPros] Re: Cascading Combo Box
Bill-
You shouldn't wait until the Got Focus event of the second combo. Your Requery
should occur in the Form_Current event and the AfterUpdate event of the first
combo.
John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Waco, Texas <yee haw>)
-----Original Message-----
From: mailto:MS_Access_Professionals%40yahoogroups.com
[mailto:mailto:MS_Access_Professionals%40yahoogroups.com] On Behalf Of agent1of6
Sent: Saturday, December 31, 2011 10:26 PM
To: mailto:MS_Access_Professionals%40yahoogroups.com
Subject: [MS_AccessPros] Re: Cascading Combo Box
Duane,
Refresh Record in the On Current of the form and in the On Focus of the 2nd drop
down box ... and it works perfectly.
thanks and have a Happy New Year. As you can tell I am really partying hard
here in front of my computer. I will not make it to midnight.
Bill
MN
--- In mailto:MS_Access_Professionals%40yahoogroups.com, "Duane"
<duanehookom@...> wrote:
>
> Bill,
> Can you share how you are filtering the second combo box? Is there something
in its criteria or are you changing the SQL of the Row Source or some other
method.
>
> Whatever you are doing, you probably need to do it in the On Current event of
the form.
>
> Duane Hookom
> MS Access MVP (hey it's finally snowing in MN)
>
> --- In mailto:MS_Access_Professionals%40yahoogroups.com, "agent1of6"
<Bill.Singer@>
wrote:
> >
> > Here is the good news. Thanks to this site I have succesfully set up two
combo boxes with the options in the second combo box based on the selection in
the first combo box.
> >
> > I have the "got focus" property on the second combo box set to refresh the
record. Both the first combo box and the second combo box are entering the
correct ID number into the correct table. The second combo box work off of a
query that sorts based on the selection in the first combo box.
> >
> > There are about 300 records in the table.
> >
> > The problem is that we I open the form and go to the next record or the
previous record the second combo box does not show the selection that was made.
It just shows as blank. When I click on the box the correct item shows up. It
is as if it was there all the time but waiting me to touch it with the mouse.
This is frustrating. I would like the second combo box to show the selected item
as I go through the next record.
> >
> > I would think the combo box would refresh when I go to the next record but
it will not show the selection until I click on it.
> >
> > What did I do wrong?
> >
> > Bill
> > Minnesota
> > Happy New Year!!
> >
>
------------------------------------
Yahoo! Groups Links
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
[Non-text portions of this message have been removed]
Minggu, 01 Januari 2012
Re: [MS_AccessPros] Re: Cascading Combo Box
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar