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

Cascading comboboxes in a subform does not refresh values.

100+
P: 111
I have a form which shows a search results based on certain parameters. This form has a subform which has three cascading comboxes, County, Township and Quadmaps. Township and Quadmap should show values based on the County selected.
Now when a user performs a search, it does not refreshes the values in the comboboxes. I have attached the screenshot. For security reasons I have grayed some part.
Please help. Let me know if you need more info.
Attached Images
File Type: jpg problem.jpg (13.4 KB, 327 views)
Mar 9 '10 #1
Share this Question
Share on Google+
3 Replies


100+
P: 106
Hi

Usually a requery method is used to refresh the subform. This can be added in the afterupdate property of your combobox.

Expand|Select|Wrap|Line Numbers
  1. Forms![MainForm].[SubForm].Form.Requery
  2.  
other than this, we may need to see your code and the underlying query.

I hope this helps.
Mar 9 '10 #2

100+
P: 111
OK I figured out what the error was. It was the underlying queries.
The fixed query under cmbTownship should look like this
Expand|Select|Wrap|Line Numbers
  1. SELECT dbo_ValLglTownship.CountyID, dbo_ValLglTownship.LglTownship, dbo_ValLglTownship.ValLglTownshipID
  2. FROM dbo_ValLglTownship;
  3.  
instead of
Expand|Select|Wrap|Line Numbers
  1. SELECT dbo_ValLglTownship.CountyID, dbo_ValLglTownship.LglTownship, dbo_ValLglTownship.ValLglTownshipID
  2. FROM dbo_ValLglTownship
  3. WHERE (((dbo_ValLglTownship.CountyID)=[forms]![frmSearchByTitle]![SubfrmLocation].[form]![cmbCounty]));
  4.  
Mar 10 '10 #3

NeoPa
Expert Mod 15k+
P: 31,768
Indeed.

See Example Filtering on a Form.
Mar 10 '10 #4

Post your reply

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