Sabtu, 17 Desember 2016

Re: [MS_AccessPros] Requery Combo in Subform

 

Update...
I gave up on filtering the subform based on the unbound combo in the main form, and instead filter it on a text field in the main form.  It now works fine and with the same requery statement you provided.

I would still like to know why the VBE stopped prompting me after the FORM argument in the REQUERY statement. (hoping I am using the correct terms for all this)


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

I must be doing something wrong.  I had tried that already, except for the ! after FORM.  i  had used the period instead.  I tried it just now with the exclamation point and still no joy.

The VBE autotype help works all the way up until I type in (or select) FORM.  The name of my subform's combo box will never come up in the VBE autotype.

And I checked several times.  My subform control and subform both have the same name.

When I replace the combo with a text box, the data is there.  I just can't get the combo to display.  any other thoughts about what I might be doing wrong?


---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: david.pratt@outlook.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

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