David-
Rather than try to figure out a "best" answer to your scenario, I think it'll be a better approach to challenge your original premise. Why do you need so many combo boxes filtered on each other? Why are there combos in the subform that depend on changing values in the outer form? Neither of those are normal or good practices.
Basically, what's the business problem you're trying to solve? I suspect that you have a fundamental table design problem that is making this much more difficult than it needs to be.
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 Dec 30, 2016, at 4:17 PM, david.pratt@outlook.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
I should have asked this question many, many hours ago and saved myself a lot of time. Now that I have a learned a little more via the school of hard knocks, I see that I need a "standard process" to replace my hit and miss practice of Requery form, Requery combo, set to nothing, etc. I have just been guessing at what to do based on the Monkey see, Monkey do practice.
I am not asking for the code at this time. Focusing on the code has added to my confusion to this point. I think I can find that later (but I may have to come back and ask some specific question). For now I am looking for general practice guidelines in plain English so that I can understand what the purpose of the code is.
Here is the general situation I am hoping to establish a standard practice for. I have the following:
Mainform = MF
unbound combo box controls in the MF header, ubc1, ubc2 and ubc3
ubc2 is filtered on the value of ubc1, and ubc3 is filtered on the value in ubc2
Mainform details section contains a bound combo (bcb1) which is filtered on the value in ubc2
Subform = SF with control name the same as the subform name, which is linked to the main form via Link fields, so the SF is requeried each time the main form record pointer is changed. However, the subform contains bound combo boxes sfbcb1 and sfbcb2, which need to be refreshed based on changing values in main form detail fields. sfbcb1 is filtered based on the value in MF bcb1 and sfbcb2 is filtered based on the value of MF txt1.
In this scenario, to improve user experience, when and where should I set the various cbo's to "nothing"?
Which events do I use, and which controls do I use to Requery the forms and combo boxes?
Do I ever need to force a Requery of the subform, or just leave that process to Access and the link fields?
To make take this less time for someone to answer, see the following format (If I could insert a table in this message this would be easier)
Main Form
Event = (OnCurrent, etc)
Action = (set record pointer, Requery something, set cbo's in main form header to nothing, etc)
ubc1
Event =
Action =
ubc2
Event =
Action =
ubc3
Event =
Action =
MF bcb1
Event =
Action =
MF txt1
Event =
Action =
Or answer in any format you choose, I am just trying to make it easy for someone to help me.
Thank you.
David
__._,_.___
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 (2) |
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