Doyce-
Open fires first - the form is about to open, and you can cancel it. At Load, the form is opening, and the recordset is in the process of "loading". Referencing any control in Open forces the form to finish loading, and the Requery (wasn't sure that would work in Open) causes the recordset to be re-evaluated. Because you have forced a value into the option group, the recordset opens properly filtered.
No, the events don't necessarily fire in the sequence listed in the Properties window.
John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
(Paris, France)
On Jul 7, 2016, at 9:42 PM, winberry.doyce@con-way.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
Doyce-
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
I suspect the form's Record Source is being resolved before the option group default value is set. That results in no records because it's testing for a Null value. And the same is probably happening with the Row Source of the combo box if it's filtered on the option group. It's a timing issue, so I'm at a loss as to what to try. I might be tempted to do this in On Open:
Me.StatusBox = 1
Me.Requery
John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
(Paris, France)
On Jul 7, 2016, at 9:25 PM, winberry.doyce@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
Doyce-
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
What code runs when you update either the option group or the combo box? Does the form open showing no records? If so, it could be that because the form doesn't allow additions (I'm assuming) and no record exists in the recordset, that the Row Source of the combo doesn't get queried. Just a guess.
John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
(Paris, France)
On Jul 7, 2016, at 8:19 PM, winberry.doyce@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
Doyce-
Is the combo box bound? It shouldn't be. Consider also setting a default value for the option group.
John Viescas
Sent from my iPad
Sent from my iPad
On Jul 7, 2016, at 20:07, winberry.doyce@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
__._,_.___
Posted by: John Viescas <johnv@msn.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (8) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
.
__,_._,___
Tidak ada komentar:
Posting Komentar