473,765 Members | 2,070 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating one loop to control multiple conditional/cascading combo boxes

3 New Member
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.c om/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_afterupdat e event. What do you think? Let me know if you need more information.
Nov 25 '12 #1
4 2900
rhuseman
3 New Member
Here is a video to help clarify.

http://www.youtube.com/watch?v=0YVeL...hannel&list=UL
Nov 25 '12 #2
zmbd
5,501 Recognized Expert Moderator Expert
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
rhuseman
3 New Member
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 Recognized Expert Moderator Expert
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
3328
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 on regions, which are managed by a number of coordinators, who oversee a large group of associates. I would like to use a combo box so that people accessing the database can choose a particular region and then have a second combo box that only...
0
2078
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 I've got a subform with a series of cascading combo boxes (thanks to the Access tutorials on fontstuff.com) that let the user assign categories to items, in this case photos. This is being done to help constrain user selections and keep the...
3
5345
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 what you can make of this... I have a main form "Events" that contains a tab control. The tab control has 7 pages. The 7th page (named "Boats") contains a subform called "BoatEventssubform". On this sub-form are two combo boxes, named...
9
6761
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 second combo to change depending on what values the user selects in the first box, it's just that every time the user changes the first combobox, the second combobox FOR EVERY RECORD goes blank.
2
2318
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 single item form. However as the form I need is a of tabular type, every time I update cbo1 to a value, the non matching cbo1's cbo2 field blanks out. The data remains as but is hidden, and not what I need. The data is all linked to bound...
2
2286
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 cboException) to filter difference absences (ie.Regular, Overtime, etc). cboCategory is filtered as follows: !!... Because I have the subform set up as a continuous form, I needed to add a text box (txtException) on top of one of the combo boxes...
3
3700
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 may need 3 cascading combo boxes and I cannot figure out how to do that. Can you help? Thank you
4
3496
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 below. tblOrg OrgID, AutoNumber, PK ZipID, Number, FK tblState StateID, AutoNumber, PK
7
5840
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 currently trying to set up a whole pile of cascading combo boxes of different levels of complexity, so I started with the easiest set - and can't even get that to work (even using the tutorial on this site at...
0
1441
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? Linked list name is Systems Activity I need to create combo box that drills down to another combo box First combobox - Category Second Combobox - SubCat I've made the Category combobox bound control source to and a Row source with a value...
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8833
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7379
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5277
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.