By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,519 Members | 2,416 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,519 IT Pros & Developers. It's quick & easy.

Datasheet subform--filter one combo box based on another not working

WyvsEyeView
P: 46
I am doing the very standard thing of filtering the contents of one combo box based on another combo box. I've done it many times, but always on a main form. Now I'm trying to do it on a datasheet subform and it is not working. After making the selection in the first combo box, when I move to the second combo box, I get the Access input parameters box. If I input the value that is in the first combo box, I get the expected results in the second combo box, so clearly, the second box simply cannot read the data that is in the first one. When I turn this datasheet subform into a main standalone form, everything works correctly, so it is the datasheet/subform aspect that is tripping me up.

I can provide the exact queries if necessary but it seems like there must be a standard trick or workaround that you could quickly turn me onto. Thanks for your help.
Jul 24 '08 #1
Share this Question
Share on Google+
4 Replies


nico5038
Expert 2.5K+
P: 3,072
Check out:
http://www.mvps.org/access/forms/frm0031.htm

You'll need to add ".form." to your field reference...

Nic;o)
Jul 25 '08 #2

WyvsEyeView
P: 46
Thank you. I am familiar with this paradigm but because I am putting the code behind the subform itself and not behind the main form, I did not think I needed to use these conventions. All the code is referring to the same form that it is behind. Do I need to put it behind the main form instead? The main form is basically blank...it's just a "holder" for the subform.
Jul 25 '08 #3

nico5038
Expert 2.5K+
P: 3,072
The reference is needed because the subform is on a "lower" level.
You stated "I get the Access input parameters box", this implies that Access can't find the mentioned field or you made a typo..

Can you post the query text of the second combobox ?

Nic;o)
Jul 25 '08 #4

WyvsEyeView
P: 46
I have the filtering working now. I had to use the Forms!Mainform!Subform.Form!ControlName syntax in the query but it is working. I would never have thought so. Live and learn :) Thanks for your help!
Jul 25 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.