473,378 Members | 1,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Creating one loop to control multiple conditional/cascading combo boxes

On my form I have 24 combo boxes ( 12 of which are conditional/cascading combo boxes dependent on the users input of the other 12 combo boxes).


I've found ways to do it by code each individual combo box ( http://stackoverflow.com/questions/7624318/vb-net-cascading-comboboxes-connected-to-dataset-from-access-changing-units). But I would really like to lean the code out and have it all in one spot.

I was thinking about putting this code in the form_afterupdate event. What do you think? Let me know if you need more information.
Nov 25 '12 #1
4 2880
Here is a video to help clarify.

http://www.youtube.com/watch?v=0YVeL...hannel&list=UL
Nov 25 '12 #2
zmbd
5,501 Expert Mod 4TB
I know that in VBA I can call a sub and pass information to that sub or function. I would suspect that you should be able to do the same for your dot-net.... so I would think that in the afterupdate event of the CBO on the right (parent) that you could call the sub to update the child CBO passing to it the information from the parent.
Not being conversant in dot-net I'm afraid that's all I can offer; hopefully someone here with more understanding will be of more help or maybe I've been able to tickle the ole-brain cells :)
Nov 26 '12 #3
give me an example of what of the vba code would look like if at all possible. I might be able to translate it.

If anyone else has any ideas/thoughts please share
Nov 26 '12 #4
zmbd
5,501 Expert Mod 4TB
rhuseman:
What I would do in VBA is use the parameters part of the sub statment to pass into the call the information I needed for the conditions. Here's the basic syntax and an example: Sub Statement.

Now, because you have so little information about what your record sources are for the combo boxs it is impossible to provide more than the outline/pseudo-code:
Expand|Select|Wrap|Line Numbers
  1. Sub Z_Example (byval "strTblNam" AS String, _
  2.  byval "strCallingParent")
  3.  
  4. '<Some code here to Declare the variables record sets/>
  5.  
  6. '<Some code here to trap errors/>
  7.  
  8. '<Some code here to create an SQL based on the table name
  9. '   in Access I'd call the table definition to fetcht
  10. '   the field names./>
  11.  
  12. '<Some more code here to to set the child/> 
  13.  
  14. '<Some more code to do what ever/>
  15.  
  16. END SUB
Nov 27 '12 #5

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

Similar topics

2
by: Cameron | last post by:
Hi, For the database I am currently working on, my employer would like the ability to use multiple combo boxes in order to filter the database. For instance the structure of the company is based...
0
by: cognoscento | last post by:
I'm currently putting together a database for my work (not an expert by any stretch, so muddling through as best as I can... you know the story...) and I could use some advice and hand-holding ...
3
by: Mike Jakes | last post by:
I hope that someone can offer a little advice on this one - I've searched the group but can't find an answer. I think that I'm doing something really stupid or missing something trivial, but see...
9
by: Edwinah63 | last post by:
Hi everyone, Please let there be someone out there who can help. I have two BOUND combo boxes on a continuous form, the second being dependent on the first. I have no problem getting the...
2
by: ShadowHawk | last post by:
Hi Everyone. I've been having a little touble with a form I'm working on. (I'm a MS Access hobbiest). I've set up the cascading combo boxes, which is working, (I took the code from Microsoft) on a...
2
by: SPOILED36 | last post by:
I am building a database to track attendance. I have one main form with multiple subforms. Within one of the subforms name sfrDailyAttendance, I also have cascading combo boxes (cboCategory and...
3
by: buddyr | last post by:
Hello, Yesterday I recieved help with two cascading combo boxes on an access form. I went the link http://www.fontstuff.com/access/acctut10.htm And basically used their first example. Now I...
4
klarae99
by: klarae99 | last post by:
Hello, I am working on an Access 2003 Database. The tables that pertain to this issue are tblOrg, tblState, tblCity, and tblZip. I have posted the table structure with only the pertinant fields...
7
by: Toireasa | last post by:
Hi, Newbie Access developer here, and my first post on this forum, so I might not get everything right - thanks in advance for your help and your patience! I'm using Access 2007, in XP. I'm...
0
by: jerelp | last post by:
I've never used a linked list in sharepoint and I've never created cascading combox boxes. I don't know if it is possible to make a SQL statement from the linked list if so how do you do it? ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.