Sabtu, 17 Desember 2016

Re: [MS_AccessPros] Requery Combo in Subform

 

David-


It's probably less confusing if the subform control and the form inside the control have the same name.

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 17, 2016, at 10:45 PM, david.pratt@outlook.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



Until this thread, I did not realize there was a difference since the control name defaults to the same name as the subform.  After your message I had to de some searching to learn the difference.  And Access is not very "friendly" about identifying when the NAME property is referring to the actual subform or the control.  

Regarding the name of the subform and the name of the subform control, do you suggest to use different names for these? I see suggestions to use ctlsfrm, etc.  Will that makes things easier in the future?
 


---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :

David-

The form is:

Me.NameOfSUBFORMControl.Form!NameOfCombo.Requery

Note that it's not the name of the subform inside the control - that might be different from the name of the control.

John Viescas, author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Access Applications

On Dec 17, 2016, at 05:21, david.pratt@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

I have a main form and subform.  In the main form I have an unbound combo in the header to filter the records of the main form.  In the subform I have a combo box which I am trying to filter based on a field in the main form. The subform combo box works fine the first time the main form is opened and filtered with the unbound combo.  However, when I change the value in the unbound main form combo, the combo in the subform doesn't work. 

I think the subform combo needs to be requeried when the main form unbound combo is changed.  I don't know how to do that, or if in fact that is my problem.  When I try to type in the subform name in the AfterUpdate event, it is not in the list of objects from which I can select.

Help please.





__._,_.___

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 (9)

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