How to Make Cascading Combo Boxes in MS Access

  Рет қаралды 31,621

Sean MacKenzie Data Engineering

Sean MacKenzie Data Engineering

Күн бұрын

This week, we are cascading into action with cascading combo boxes in MS Access. Also known as drop-down lists, combo boxes can be made to cascade in many interesting ways. For example, you might choose a manufacturing assembly in one combo box and then have the next combo show only the parts for that assembly. In this video, we are going to demonstrate a combo box trio that will let you select country, then region of that country, then city from that region. Many thanks to viewer @pilotgarry for the request to make this video.
Related Videos:
How to Make a Search Form with Combo Boxes in MS Access
• How to Make a Search F...
How to Make Cascading Combo Boxes in MS Access
You are watching this video now!
Bound vs. Unbound Forms and Controls in Microsoft Access
• Bound vs. Unbound Form...
How to Make a Listbox in MS Access Part 2: Multi-select
• How to Make a Listbox ...
How to Create In and Out Listboxes in Microsoft Access
• How to Create In and O...
How to Make a Multi-Term Search Form and Report in MS Access
• How to Make a Multi-Te...
How to Use Timers to Run Actions or Code on an Interval in Microsoft Access
• How to Use Timers to R...
How to Use Before Update in Microsoft Access
• How to Use Before Upda...
How to Make Changes to Text in a Textbox in Microsoft Access Using SelStart and SelText
• How to Make Changes to...
How to Add Combo Box Rows On-The-Fly in MS Access
• How to Add Combo Box R...
How to Run Code as Your MS Access Form Opens - On Open, On Load, and On Current
• How to Run Code as You...
How to Use On Close and On Unload with Microsoft Access Forms
• How to Use On Close an...
You can find the data used in this example on this link:
datahub.io/cor...
Credit for the dataset: geonames
Special thanks: Lexman and the Open Knowledge Foundation
Follow us on social media:
/ mackenziedataanalytics
/ seamacke
/ seamacke
/ seamacke
/ psmackenzie
Get Microsoft Office including Access:
click.linksyne...
Got a KZbin Channel? I use TubeBuddy, it is awesome. Give it a try:
www.tubebuddy....
Interested in transforming your career or finding your next gig?
system.billzon...
Want my team to do a project for you? Let's get to it!
system.billzon...
How to Make Cascading Combo Boxes in MS Access
ms access combo
cascading combo boxes ms access
cascading drop down lists ms access
ms access filter combo box
ms access after update event
ms access update combo box
ms access rowsource
ms access row source
ms access combo box row source
country drop down list
city drop down list
ms access city combo box
ms access country state city drop down list
Sean macKenzie Data Analytics

Пікірлер: 185
@ProfGilRodrigues
@ProfGilRodrigues 3 жыл бұрын
There are several ways to build a cascading combobox. This was the simplest and most straightforward I've ever seen here on KZbin. Congratulations.
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
Many thanks for your feedback!
@ajn4753
@ajn4753 3 жыл бұрын
I was about to lose my mind until I watched this video! THANKS!!!!!!!!!!!!!
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
Glad it helped!
@mitchellfolbe8729
@mitchellfolbe8729 Жыл бұрын
It only took me about an hour and going through this 4 times to get it. I think I made about every mistake you could make before it worked. Thank you.
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
Congrats on getting through! A new tool in your toolbox 🛠
@ricardoglopes7687
@ricardoglopes7687 Жыл бұрын
Whenever we see a video that significantly increases our knowledge, our expectations also go high. So, here is the question. Can the user select only one segment, say Regions and the other ones would update accordingly? I realize the complexity as all drop-down boxes would start with a full house (poker analogy). 😀
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
Yes, you can do this as well. A user could select a Region and the country would update as well as the list of possible cities.
@aryanrathod5311
@aryanrathod5311 9 ай бұрын
Thank you very much for this simple method and it worked accurately in my project that I am working on for my internship
@seanmackenziedataengineering
@seanmackenziedataengineering 9 ай бұрын
Great to hear!
@ronthornton4421
@ronthornton4421 7 ай бұрын
Thank you! This was easy to follow. Expanding the query column when referencing the cboCountry combo would have been good for me to see the entire criteria statement.
@seanmackenziedataengineering
@seanmackenziedataengineering 7 ай бұрын
Great suggestion! I'm working on making these more readable.
@hankcohen3419
@hankcohen3419 3 жыл бұрын
Excellent! Exactly what I needed to know. I especially like the additional tips on how to clean up when things change.
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
Glad it was helpful!
@lion_0077
@lion_0077 2 жыл бұрын
@@seanmackenziedataengineering one question, how to use cascading combobox in continuous forms????, because when I go to second records it's disturbing all other records
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
@@lion_0077 It does not work in continuous forms. Too bad! It would be neat. You can create a series of subforms to simulate continuous forms and then apply cascading combos, but that is a lot of work!
@puneboy123
@puneboy123 6 ай бұрын
What about embedded macro and control buttons to save, refresh, Delete ,Add new?
@ammadkangatabdulla8775
@ammadkangatabdulla8775 2 жыл бұрын
Fantastic presentation clear and simple.
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Many thanks!
@franciscorossier5239
@franciscorossier5239 3 жыл бұрын
Awesome. Saved me hours of trial an horror. Thanks Sean! Hugs from Chile (which quickly appear in the video in the country list XD )
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
I'm glad it worked for you! Chile is close to the top of the list :-D Good luck on your project!
@MBTilak-sr4uf
@MBTilak-sr4uf 3 жыл бұрын
Thank you Sir. Explained very clearly.
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
Glad it helped! Cheers
@birasagermain7293
@birasagermain7293 Жыл бұрын
Dear Sir Sean I like the way you teach; thanks really
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
Most welcome! thanks for watching!
@pilotgarry
@pilotgarry 4 жыл бұрын
Enjoyed this one especially how you get the combo boxes to update themselves
@seanmackenziedataengineering
@seanmackenziedataengineering 4 жыл бұрын
Thanks, glad you enjoyed it!
@rrpprp
@rrpprp 3 жыл бұрын
VERY helpful and beautifully explained, thanks a lot!!!
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
Glad you enjoyed it!
@mehranbarahouei2346
@mehranbarahouei2346 5 күн бұрын
Great Job💯
@seanmackenziedataengineering
@seanmackenziedataengineering 13 сағат бұрын
Thx!
@davegoodo3603
@davegoodo3603 8 ай бұрын
Thanks Sean.
@seanmackenziedataengineering
@seanmackenziedataengineering 8 ай бұрын
Very welcome! cheers
@wizardmaster6639
@wizardmaster6639 2 жыл бұрын
Sean - this was very clear - thanks
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Glad it was helpful!
@farinatty
@farinatty 3 жыл бұрын
Great explanation. Normalising the source data by creating separate tables for country and region state would speed process and avoid having to use distinct statement in SQL.
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
Great feedback! Glad you enjoyed it - thanks
@dazzil100
@dazzil100 8 ай бұрын
Thanks Man !!!
@seanmackenziedataengineering
@seanmackenziedataengineering 8 ай бұрын
You bet!
@Burnt_Toast1469
@Burnt_Toast1469 2 жыл бұрын
Great video! It really was easy to follow and understand. One question tho, for the set up you had it worked great if you go in order but how would you set it up if you have say 20 combo boxes bud filter randomly through them. Is there a way to do this method you showed in the video? Hope you can shed some light on this!! :)
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
I saw you posted on the Combo Search Form video about this. Actually this is pretty common, once people start to feel the power of the combo! There are a few ways to do it. You can create a table with all of the names of your combos in it. When the after update occurs, you can loop through the list of combos and build your sql or filter string, checking each combo for an entry as you go. To loop through records try this: kzbin.info/www/bejne/bXnGnIygfcSqnZY A different way to do it is to make sure that you properly name all of your combos and text fields you use to build your filter string. Then, each time a selection is made, you can loop through the "control" collection on the form, and when you find a control with its name starting with cbo or txt, then check for a value in that control and add it to the filter using code similar to what you saw in the Combo Search Form video. Good ideas for a video - a little more in-depth :-)
@Burnt_Toast1469
@Burnt_Toast1469 2 жыл бұрын
Thanks so much for taking the time and answering my question! You’re amazing!
@garcimat
@garcimat 2 жыл бұрын
You are the best Thank you very much
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Thanks!
@yalcnsofulu675
@yalcnsofulu675 2 жыл бұрын
All perfectly. But one question remains. How can I use these fields for every record in the database? For example, in a database, I would like that I could use this data personally
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Good question! If you wanted, you could set up various configurations that would filter your database for you.
@omersharif3823
@omersharif3823 3 жыл бұрын
Thanks Sir. This would have been incredible challenge without you.
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
I'm glad it helped!
@bengtgudmundsson5418
@bengtgudmundsson5418 Жыл бұрын
Great tutorial, thank you, I try to figure out how to show the country, subcountry and city as you do but save the Primary key ID in the table I am populating with my form.
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
Nice! You can set the Control Source of the final combo to a field in your table, if you want to save that final choice's ID.
@bengtgudmundsson5418
@bengtgudmundsson5418 Жыл бұрын
@@seanmackenziedataengineering Thanks, working on it now
@bengtgudmundsson5418
@bengtgudmundsson5418 Жыл бұрын
@@seanmackenziedataengineering Worked very well, thanks. Now I have another obstacle and would really appreciate your advise. I have three combo boxes in a form and they all show text strings and store primary key values(1,2,3......) into three different fields in a table. Needed to store values for all three fields since 2nd and 3rd option sometimes lack text strings. The source data for the combo boxes are taken from a similar table as you have in your example. My issue is that when I load the form the text string is only shown in two of my combo boxes, the third (actually the middle one) is blank. If I modify the blank combo box to show the primary ID it works. Any idea how to solve this?
@mahmoodalhatem6710
@mahmoodalhatem6710 Жыл бұрын
Thank you Sir
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
Most welcome!
@veliyathuab
@veliyathuab 2 жыл бұрын
Excellent
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Thank you! Cheers!
@Waberduggi
@Waberduggi 2 жыл бұрын
Thank you very much
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
You are welcome!
@awgldk8141
@awgldk8141 Жыл бұрын
Really useful! Thanks a lot.
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
Glad it was helpful!
@frankpierce1924
@frankpierce1924 2 жыл бұрын
I really learned from your video. Thank You! I was wondering if you, please, could show how to display another field in the cities database after you select the Country, Region and City, for example display the population? or Assuming there is a table of images with an image associated with each city display that image. Really appreciate your tutorials. Not interested in saving the population or image just displaying it in the form
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Good question! For the population, you can simply add that field into the query for the city drop-down, but leave the column width as zero. Then, you have the city and another hidden column in the drop down list. When you select the city, on the after update event just get the value of the hidden column of the drop down (which you already loaded) and display it on the form. Me!txtPopulation = Me!cboCity.Column(2) Something like that.
@Only-a-Guess
@Only-a-Guess Жыл бұрын
Hi, I have used this again and it works perfectly other than when the after update runs the cascaded field still retains information in it rather than being blanked out as it does in your video have I missed something, Thanks
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
I'm glad it worked! To do that final step, you need to make sure the control's value is set to Null in the code. ie. Me!cboMyCombo = Null You can post your code if you like and we can take a look.
@Only-a-Guess
@Only-a-Guess Жыл бұрын
@@seanmackenziedataengineering Thanks for that it worked great
@abdulhamidalhaddadi2255
@abdulhamidalhaddadi2255 2 жыл бұрын
Thank you
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Welcome!
@Rhythm515
@Rhythm515 Жыл бұрын
This is a great tutorial ~ Question, what happens when the first Cmb creates a list in the second Cmb that has the same value. E.g., you select criteria A in the first Cmb and you get the list 2,4,6,8 in the second Cmb. Then you select criteria B in the first Cmb and you get the list 1,3,5,7,8 in the second Cmb. If you select 8 from the second Cmb how will the third Cmb know which first Cmb criteria to pull? It seems to me it will pull all of the 8's from both criteria A & B you selected in the first Cmb. If I am correct, how can you fix it? And if I'm wrong, can you provide an explanation - I am dealing with this exact scenario and it is causing me to want to drive on the sidewalk ;) Thanks Sean...
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
That's a great question! The reason it doesn't get screwed up is because when you change from A to B in the first combo, the list actually changes to the proper subset. So, if 8 is actually belonging to A and B, then just select 8, and the subset of 8 will appear in the third combo. In many cases, it is possible for 8 to belong under A, B, and C, so this is the desired operation. ie. Choose a car door, sub assembly for two different car doors include the same window G1, etc.
@MariaGarcia-je6qb
@MariaGarcia-je6qb 4 ай бұрын
Me sirvió!! Muchas gracias. No obstante, no se guarda en el formulario :(
@seanmackenziedataengineering
@seanmackenziedataengineering 4 ай бұрын
Si configura la propiedad RecordSource para ComboBox, guardará la elección. ¡Buena suerte!
@jean-luccomtois8483
@jean-luccomtois8483 3 жыл бұрын
Great video, thank you! I would like to know if it is possible to enter only a few letters and that the list will update no matter where the text is. LIKE Contains in Excel. Example: If in the contry field I enter "nia", we would have "Albania ... Armenia ..." Thank again Sean!
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
This is a great question, and a good candidate for a future video. Yes, you can do this with a bit of coding. Essentially, you take the typed contents using the key events (ex. key down, key up) and then update the row source of the combo box with a SQL statement that uses LIKE '*nia*' (your example). Or for ODBC tables this may be LIKE '%nia%'. You may also use ALIKE '%nia%' for some cases.
@jean-luccomtois8483
@jean-luccomtois8483 3 жыл бұрын
Thks! Hope you will do another good video! ;)))
@Billy-np5cz
@Billy-np5cz 3 жыл бұрын
In order to create these drop down menus, does all the columns have to have the information or can relationships be created that associate the columns if they are in multiple tables. For instance if one table is a single column of 3 items, and another table associated to those 3 items is 24 items long?
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
Good question. You can do it - just do a Select on the second table where the value for the first is from the first table. You don't need any formal relationships.
@santars2030
@santars2030 4 жыл бұрын
Thank a lot, explained easy
@seanmackenziedataengineering
@seanmackenziedataengineering 4 жыл бұрын
You are welcome!
@arthurgrajeda
@arthurgrajeda 2 жыл бұрын
Sean, I have a cascading combo box setup., however on the third box, sometimes I provide a hyperlink. Is there a way that when the 3rd box populates, it would allow a hyperlink to be pressed or have a button that will recognize the link and the user can hit go and it would go to that website?
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
You sure can! You could put a button with two lines for Click: If IsNull(Me!cboMyCombo3) Then Exit Sub Application.FollowHyperlink Me!cboMyCombo3
@ajito079
@ajito079 4 жыл бұрын
Thank you very much for the video. Very useful and well explained! Just a question. If the "City" field contains only one value, is it possible for it to appear automatically in that field? For example, at minute 14:13 the only value is "Charlottetown" but you have to click on the dropdown and then select it so that it appears in the "City" field. I think that if, in the case of a single value, the field was completed automatically, it could speed up a lot!
@seanmackenziedataengineering
@seanmackenziedataengineering 4 жыл бұрын
That is a great question! Users will find that very handy. All you need to do is add one line after you set the RowSource, to check the ListCount property. Just add: If Me!cboCity.ListCount = 1 Then Me!cboCity = Me!cboCity.Column(0,0) This line simply retrieves the first (and only!) value in the list if there is one row in the list. After this, when there is only one value in the city list, users will see it pre-selected!
@ajito079
@ajito079 4 жыл бұрын
@@seanmackenziedataengineering Thank you!
@seanmackenziedataengineering
@seanmackenziedataengineering 4 жыл бұрын
No problem! Good luck on your project.
@nicolehayek9880
@nicolehayek9880 3 жыл бұрын
this is simply amazing ! is there a way to use the cascading combo boxes to filter a table ? and get the values that matches the values selected in the combo boxes ?
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
Yes you can! You could use a query for this. In your query design, select each of the fields in the table, then in the criteria row, put in the expression referencing your combo boxes. For example, Forms!MyForm!cboCountry. Then, each time you open the query, it will look for the values you chose in your combo boxes.
@nicolehayek9880
@nicolehayek9880 3 жыл бұрын
@@seanmackenziedataengineering worked like a charm ! thank you :D
@katherinemikesell9727
@katherinemikesell9727 2 жыл бұрын
@@seanmackenziedataengineering Hi! Could you please explain this in a little more detail? I have the combo boxes working, but I'm not sure how to connect the query so I can display the filtered table? Thank you!
@sundarambm3666
@sundarambm3666 9 ай бұрын
I would like to learn multiple dropdown with combo box example like when particular state is selected the respective district should get listed down in another combo. kindly help in this regards
@seanmackenziedataengineering
@seanmackenziedataengineering 9 ай бұрын
Great suggestion! You can accomplish it with the techniques in this video. Go for it!
@melinagrandmont7105
@melinagrandmont7105 2 жыл бұрын
Hi, thank you so much for this tutorial! I got it to work and store the data I needed in a separate table. While the cascading drop-down lists work and I wrote the code builder with the 'after updates' as shown in the video, I am getting an error each time I select a value for one of the combo boxes on the form interface. The error reads as follows: Microsoft Visual Basic Run-time error '2465': Microsoft Access can't find the field 'Level_2_Title_Combo' referred to in your expression. I then have the option to 'End' or 'Debug'. If I click 'End', I can continue with the remaining cascading drop-downs (and get the same error each time), and if I click 'Debug', it takes me back to the Code Builder and highlights the code line in question. I checked for typos and can't find any, so I am unsure what is causing this recurring error. Would you have some insight to provide? Thanks!
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
I see! Ok, you need to go to the properties on each of your combo boxes, then the Other tab, then the Name property. Does it match exactly to Level_2_Title_Combo, or does it say something else? This is your first check, because Access is looking for that field or control and it cannot find it. If you like, post your code and I will look.
@melinagrandmont7105
@melinagrandmont7105 2 жыл бұрын
@@seanmackenziedataengineering Thank you for your response! It turns out I had named the combo boxes with spaces (i.e. Level 2 Title_Combo) but the code automatically replaced these spaces with underscores, so it seems to have created a disconnect. I just tried adding the underscores to the name under properties as you suggested, and now everything works flawlessly!! Will remember not to add spaces in the future :)
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
@@melinagrandmont7105 glad that you got it!
@jalaluddin8276
@jalaluddin8276 Жыл бұрын
Thank you very much Sean for your help. I would like to email you my db on loan module. Thank you once again.
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
You can send it - make sure to join me here too: patreon.com/mackenziedataengineering Thanks
@KS-xd6ql
@KS-xd6ql 2 жыл бұрын
Hmm I learned this using "requery" in the update event. Is your way superior?
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
In some (rare) cases that I observed over the years, requery/refresh will not update the combo box data. Setting RowSource = RowSource was the only method that would properly force a requery in every case.
@shafiqueahmad9024
@shafiqueahmad9024 3 жыл бұрын
I Will Follow You Like A Student
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
Fantastic!
@alexandermichaelis5627
@alexandermichaelis5627 3 жыл бұрын
Thank you for the helpful video. Is it possible to apply the cascade from to field onto one combo box? For example, let’s say we had the population for certain cities (not all have the data) by year. Can you filter the city combo box by region/state and year (assuming you had another field for year in the form)?
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
Yes you can! You can set up the combo with any filters you want. You will just change the filter string to look at the other text fields.
@alexandermichaelis5627
@alexandermichaelis5627 3 жыл бұрын
@@seanmackenziedataengineering would you write the same rowsource = rowsource code for the year in the StateRegion after update event?
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
@@alexandermichaelis5627 that's right!
@tutsecret499
@tutsecret499 2 жыл бұрын
How can I make dropping the box list without clicking on the arrow, instead when I tab to next field, I want the box list drops automatically to see the contents inside and I choose/type in the field. Example: in the boxlist there are this: 1-Completed treatment, 2-Pending Treatment, 3-Not eligible, 4-Expired and so forth. I have 9 items to choose from and I never know by hard the menu. It hurts the hands when I click to much over and over on the arrow dropbox when updating 100 rows.
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
You can cause the combo box to automatically drop down: Me!cboWhatever.DropDown Put this in the after update or on exit of the field previous to this combo box. Good luck!
@shafiqueahmad9024
@shafiqueahmad9024 3 жыл бұрын
Great... I am very GLAD to copy your Trick.
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
I’m glad it helped!
@shafiqueahmad9024
@shafiqueahmad9024 3 жыл бұрын
@@seanmackenziedataengineering Sir But it not works with Bounded cbo. So please teach me how to store the selected data into a table from these Combo boxes
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
You can certainly use this technique with a bound combo box. However, you'll need to first make sure your form is bound and has a Record Source on the Data tab in it's properties. Then, set the Control Source on the Data tab of the combo box properties. You will choose a field from your form's Record Source query or table. Then, it will be a bound combo box.
@shafiqueahmad9024
@shafiqueahmad9024 3 жыл бұрын
@@seanmackenziedataengineeringSir. In Another Table Where Theses Values Are stored [CITIES]. Please Tell me how to prevent Duplicate Data Entering in CITIES Table. e.g I have a Table "ItemDefine" Item name[Country], Item Type[State], and Item Size[City]. These Three Column will Never Accept Same Value.
@shafiqueahmad9024
@shafiqueahmad9024 3 жыл бұрын
@@seanmackenziedataengineering Sir. After Bounding The Combo Box on Query Builder as i Type DISTINCT in SQL View the Combo Box is not showing any value and if i add ID(Primery Key) it Shows the values but not in Distinct
@dbdata9836
@dbdata9836 2 жыл бұрын
thanks
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
No problem
@davidskilbeck588
@davidskilbeck588 Жыл бұрын
Hi, would this work if this form is of a continuous type?
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
No, continuous forms will be difficult because every "form" in the detail section will change each time you select in one row of the combo.
@lion_0077
@lion_0077 Жыл бұрын
How to make search box as(while) we type at that time filter form(on that second filter form)??
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
Great idea for a video! You can use the key down and key up events for this.
@m.albayati5925
@m.albayati5925 2 жыл бұрын
Hello Sean, I tried to do it, but I got an issue. I have 10 records and if I change the city or country on one of them it will change the cities and countries for the other 9 records!! :) Where should the selected info ( cities and countries) be saved, on which table? Thank you,
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
You're probably using this technique on "continuous forms" instead of "columnar forms". You'll notice in this video that my combo boxes are "unbound", meaning they are not connected to a field in the database. This is useful on columnar forms only, where many records aren't shown at once. This is a limitation of Access forms. If you have a list (continuous forms), perhaps put a button for "Edit" that will open a single form (columnar) with all the data nicely displayed for that record. Then you can use cascading combos for cities etc.
@m.albayati5925
@m.albayati5925 2 жыл бұрын
Thank you so much for your help
@santars2030
@santars2030 3 жыл бұрын
Excellent guided, but I am facing some problem with while using it in sub form, as we applied settings in form which can not be operated WHILE USING IT AS sub form , so pls guide how to rectify
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
If you mean that one combo is on a form and another combo is on a subform: In the After_Update of the combo on the parent, use Me!SubformName.Form("SubFormCombo").RowSource = Me!SubformName.Form("SubFormCombo").RowSource If you mean that the combo to refresh is on the parent, in the After_Update for SubFormCombo (in the subform code, not parent) use Me.Parent.Form("ParentComboName").RowSource = Me.Parent.Form("ParentComboName").RowSource
@accessbyfarrukhshah
@accessbyfarrukhshah 3 жыл бұрын
How we can use cascading combo box in continuous form? if we add 2nd record in continuous form using cascading combo box then the previous record is automatically invisible! can you make a video of it that how we can use cascading combo box in continuos form? thanks
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
Continuous forms are pretty limited in this respect. When the rowsource is set, it is set for all of the visible rows. This is why your selections look like they disappear. You certainly *could* program a solution that looks like continuous forms and allowed this kind of selection, but it might be a lot of work! Maybe an idea for an advanced video. Thanks!
@accessbyfarrukhshah
@accessbyfarrukhshah 3 жыл бұрын
@@seanmackenziedataengineering Thanks for the reply and I am keenly interested and waiting for, that you will make a video on it.
@shawnritter3911
@shawnritter3911 2 жыл бұрын
I found that Me!cboRegionState = Null, throws an error, however I did find a workaround Me.Requery or Me.Recalc
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Glad that worked for you! You can also use some code to check for nulls in advance and then decide what to do.
@Only-a-Guess
@Only-a-Guess 2 жыл бұрын
Hi, I used your video to make a cascading combo box for an equipment inspection database can I use this form as a subform as is or would I need to do anything different if it is in a subform. thanks
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Yes you can! If you reference the subform, you may need to add one step: Forms!MyForm!MySubform!cboMyCombo Also you can see how to reference here: kzbin.info/www/bejne/bamTZ6uges-EbZo
@tk5883
@tk5883 2 жыл бұрын
I have 4 tables with different data in them. I have set up the combo boxes and now I would like to be able to take the data selected from the combo boxes and input on another form. Is this possible. I want to be able to select from each box and then each boxes data populate to another form or maybe easier to input on the same form. I need to be able to select the details of an assignment then create a new set of assignments based on the boxes. If this confusing I am sorry.
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
You sure can! Just create a button on your form, then in On Click you can do something like: DoCmd.OpenForm "frmAssignments", acNormal, , , acFormAdd Forms!frmAssignments!txtMyField1 = Me!cboValue1 Forms!frmAssignments!txtMyField2 = Me!cboValue2 Forms!frmAssignments!txtMyField3 = Me!cboValue3 Forms!frmAssignments!txtMyField4 = Me!cboValue4 DoCmd.Close acForm, Me.Name 'If you want to close the selection form That will open your assignments form on a new record, fill the four values (you have to change the field and combo box names to yours), then close itself. To get you started!
@tk5883
@tk5883 2 жыл бұрын
@@seanmackenziedataengineering Thank you I appreciate the assistance. I tried it and it didn't work I don't think I have it set up correctly. I will continue to work with it and see.
@tk5883
@tk5883 2 жыл бұрын
@@seanmackenziedataengineering I figured it out Thank you, but we decided to use this setup with a sub-form and now it won't work. Any tips????
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
@@tk5883 If all of the combos are on the subform, then just add the subform name like: Forms!MyForm!MySubform!cboMyCombo You can see more about parent to child subforms here: kzbin.info/www/bejne/bamTZ6uges-EbZo
@baseer4371
@baseer4371 2 жыл бұрын
Hi there , It value save table data?
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Good question! Yes, you can set the ControlSource for a combobox, and it will save the data in your table.
@alandonner3163
@alandonner3163 2 жыл бұрын
do you have any videos on relationships
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
You bet! Here is an early one kzbin.info/www/bejne/qqm0mapse9Bog68
@badredinedeghiche5848
@badredinedeghiche5848 2 жыл бұрын
i like you man
@seanmackenziedataengineering
@seanmackenziedataengineering 2 жыл бұрын
Thanks for watching!
@nemo9396
@nemo9396 3 жыл бұрын
How do you make a form that loads up different forms depending on a previous choice?
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
Thanks for your question;; to do this, you can make some VBA for your "open" button. In the VBA, you can check the selected values on the form and then open a different form for many combinations. ex. If Me!txtDivision = 1 And Me!cboDifficultyLevel = "Low" Then DoCmd.OpenForm "frmEasyEntry" Else DoCmd.OpenForm "frmNormalEntry" End If Or, if you have many selections and forms, you can use Select Case. Check out this video to see a demo: kzbin.info/www/bejne/e2ark4mjra2ribM
@zoom2suraj
@zoom2suraj 2 ай бұрын
👍
@seanmackenziedataengineering
@seanmackenziedataengineering 2 ай бұрын
🙂
@jungjungdelosreyes4147
@jungjungdelosreyes4147 3 жыл бұрын
sir, do we have a linked to download the MS Access file samples. Great video, thank you much and more power.
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
Hi, you can get the data file for cities in the video description. From there, you can make a new Access file and follow the instructions. Have fun!
@greggsolomon3648
@greggsolomon3648 Жыл бұрын
At 4:51 row source --- from there, the steps are not clear. He says row source. It hasn't updated. In his there is at the end of the field two icons, one I think is a downarrow the nect 3 dots. I only have 3 dots. He clicks I think 3 dots. Then a window opens- show table. This does not happen in my test file.
@seanmackenziedataengineering
@seanmackenziedataengineering Жыл бұрын
You need to make sure that you click on the drop-down (ie. it is selected) before you go to properties, otherwise it will show properties of some other object, like a text box or the form itself. Good luck!
@greggsolomon3648
@greggsolomon3648 Жыл бұрын
Thank you. I'm going to give it ago --
@satyabanukil779
@satyabanukil779 3 жыл бұрын
I have a tabular form with a combo box. For instance, I have two records in that combo box "John" and "Jack". Now I want to add another name to that which I can select henceforth and the combo box shall now show three records instead of the initial two. It is possible. Kindly suggest.
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
It sounds like you want to add a selection "on-the-fly", when the form is open, and not in design view. All you need to do is insert a new name record into the table that is the source for your combo box, then refresh the combo box using the method in this video. For example, you could do this on the "double-click" event of your combo box. Whenever someone double-clicked the box, a pop up would ask the user to type in a name. After they clicked "OK" to add the new name, the code would insert a record in the table and then refresh the combo. The new selection list would be presented. First, open the form in design view and click on your combo box. Open properties and find events, then "DoubleClick", then click the ellipsis (three dots) to open that event for coding. Then, make a text box called txtHiddenValue somewhere on your form and set the Visible property to False. This will give you a parameter to use. The coding would look something like: strInput = InputBox("Please enter a name.") Me!txtHiddenValue = strInput strSQL = "Insert Into NAME_LOOKUP_TABLE (Lookup_Name) Values (Forms!MyFormName!txtHiddenValue)" DoCmd.SetWarnings False 'Turns off the "are you sure" message DoCmd.RunSQL strSQL 'Insert the record DoCmd.SetWarnings True 'Turn warnings back on Me!cboMyCombo.RowSource = Me!cboMyCombo.RowSource 'Refresh the combo
@satyabanukil779
@satyabanukil779 3 жыл бұрын
@@seanmackenziedataengineering Thnx a lot Sir. Definitely shall try your suggestion. Since in our country, we don't get such tips promptly. If you get time, kindly make a demo for doing this as after bringing the text box, how to connect it and define as text hidden value and finally how to create link between hidden txtbox with the combo box. My main table name is table1, form name form1 and name of the look up table lookupart1. Regards.
@satyabanukil779
@satyabanukil779 3 жыл бұрын
Further tried with your code. Just changed table_name to Table1, Combo_Name to Combo5 as per the table I created for testing purpose. But primarily it allows me to enter data. then again a parameter comes after entering data into it, error message 3346 appears. So it is not working. My table structure has only two fields. ID and Name and I want to update the field Name through combo Box.
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
I just posted a video for you to view, showing two ways of accomplishing this task. Check it out: kzbin.info/www/bejne/l5KnoZyYlNKMiKM Thanks for telling me about your project! Let me know how it goes.
@satyabanukil779
@satyabanukil779 3 жыл бұрын
@@seanmackenziedataengineering Tried it Sir. Thnx a lot. But in my case, when I put new data in the prompted inputbox again a parameter appears and if I enter the same name again. It worked. But could not understand the additional step. Besides, creation of the lookup table and its structure could not be understood as without it the code will not work. Now if I create the first table (main table based on the form to be made) and assign any item as look up, then there are three options and if I choose "I want to lookup field to get..." then I have to link the lookup table. So I understand that Until I create the lookup table, nothing works and error message appears. Sir during the last two days, I have given you lot of trouble. Still when you asked for my feedback, I am to request you give a full demo from the scratch. The link which you have given where tables, combo box etc.are already created. I hope you understand the problem being faced by me. Regards.
@naderahmadi6217
@naderahmadi6217 3 жыл бұрын
Hi, there I am gonna to make combo boxes on tables for Cities and States! is it possible? I don't want use form for making Combo boxes! if it's possible please guide me. thanks a lot.
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
You can make drop-downs in the table. In design view on your table, click on a column, then the Lookup tab. Change the display control to Combo Box, set a table or list as the RowSource, and you're done!
@naderahmadi6217
@naderahmadi6217 3 жыл бұрын
@@seanmackenziedataengineering Could you please Explain more about this method? is it possible make a video for to describe step by step! because I should add several changes in property sheet, and I don't know these Tricks.
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
@@naderahmadi6217 stay tuned! I'm going to do a tutorial series on the basics this year. Cheers
@naderahmadi6217
@naderahmadi6217 3 жыл бұрын
​@@seanmackenziedataengineering Good luck. Thanks for your consideration.
@maureenreeder
@maureenreeder 3 жыл бұрын
Ugh..I'm a beginner and don't know code. Sure this is great for those who do.
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
Give it a try! It might be easier than you think ;-)
@shafiqueahmad9024
@shafiqueahmad9024 3 жыл бұрын
Sir. I have a problem with my keyboard layout. how to change automatically my keyboard layout in some fields
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
This is a very interesting topic! I know that some have done similar things before. Here is an older but neat article: bytes.com/topic/access/insights/908560-how-implement-multi-lingual-database
@shafiqueahmad9024
@shafiqueahmad9024 3 жыл бұрын
@@seanmackenziedataengineering . difficult to understand this article.
@santars2030
@santars2030 3 жыл бұрын
Hi Sir, thanks for ur guidelines, just having one issue, I have been used ur coding, for 4 fields, but in some of 3rd field there r values from which 4the field easily appear, but in some cases 3rd field is empty then 4the field not appear, so how can I resolve this stage. Here I have to appear 4th feild though 3rd field is empty, Pls guide. Thanks
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
Thanks for your comment. I'm not sure what the problem might be here. You have four cascading combo boxes that load in sequence?
@santars2030
@santars2030 3 жыл бұрын
@@seanmackenziedataengineering yes sir. I have 4 combo box. 1st nd 2nd having value. And in 3rd box don't have value. But still I want 4th combo box value from 2nd combo box.
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
@@santars2030 I checked your design. For your case, you will go to the SQL design in your 4th combo box (properties > rowsource), where you will see "Or" in the design grid. Currently you look for 3rd field in there. You can add your 2nd field/combo to the end, (on new row of "Or") then use Forms!MyForm!Combo2 for the "Or" entry. This says "Show me the 4th combo list for values in 3rd combo OR the value in the 2nd combo. Good luck!
@santars2030
@santars2030 3 жыл бұрын
@@seanmackenziedataengineering Sir still not wored, pls check email all detail issue highlighted . Thanks
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
@@santars2030 Thanks for the screenshot. You were almost there! In this case, just remove the criteria expression from the DefectDetails "criteria". Also remove it from the "or" row for DefectDetails (both rows). Your first solution was different than I imagined. Good luck!
@santars2030
@santars2030 3 жыл бұрын
Thanks for ur solution. Sir regarding my problem I sent my queery details via messenger. Pls acknowledge
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
Thanks - I received your msg on my website and here on YT. I will review..
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
This was a great exercise, thanks for bringing it forward! *EVERYONE PLEASE NOTE, IF YOU ARE USING YOUR CASCADING COMBOS ON A SUBFORM, THIS WILL HELP YOU* For this case, the "parameter" is broken when you use Form B as a subform. To fix it, go design view on Form B, then edit the RowSource for each of the affected combo boxes: Now it probably says something like Forms!FormB!FieldName It needs to "see" the field value when it is running, which means it is on the subform, so try: Forms!FormA!FormB!FieldName As you can see, you just insert FormA! into the string to look down one level on the forms, because FormB is running as a subform. It will only work when FormB is open as a subform to FormA. Of course, change FormA and FormB in the above to your form names.
@shafiqueahmad9024
@shafiqueahmad9024 3 жыл бұрын
My language is URDU
@seanmackenziedataengineering
@seanmackenziedataengineering 3 жыл бұрын
Did you ever solve that problem for different languages in different fields?
@shafiqueahmad9024
@shafiqueahmad9024 3 жыл бұрын
@@seanmackenziedataengineering Not yet Sir
How to Use RecordsetClone in Microsoft Access
18:51
Sean MacKenzie Data Engineering
Рет қаралды 1,8 М.
SHAPALAQ 6 серия / 3 часть #aminkavitaminka #aminak #aminokka #расулшоу
00:59
Аминка Витаминка
Рет қаралды 2,2 МЛН
Life hack 😂 Watermelon magic box! #shorts by Leisi Crazy
00:17
Leisi Crazy
Рет қаралды 32 МЛН
How to Make a Search Form with Combo Boxes in MS Access
18:53
Sean MacKenzie Data Engineering
Рет қаралды 35 М.
CASCADING COMBO BOXES in Continuous Form of Microsoft Access
9:01
Edcelle John Gulfan
Рет қаралды 1,1 М.
How to Create CASCADING COMBO BOX in Microsoft Access
9:19
Edcelle John Gulfan
Рет қаралды 12 М.
How to filter a drop down list with another in Access 2016?
25:20
Computer Tutoring
Рет қаралды 27 М.
How to Make a Multi-Term Search Form and Report in MS Access
38:16
Sean MacKenzie Data Engineering
Рет қаралды 10 М.
MS Access Cascading Combo Boxes Method 1
18:23
Microsoft Access Programming
Рет қаралды 38 М.
How to Retrieve Any Column Value from a Combo Box or List Box in Microsoft Access
19:12
Sean MacKenzie Data Engineering
Рет қаралды 15 М.
How to Create a Search-As-You-Type Box in Microsoft Access
21:32
Computer Learning Zone
Рет қаралды 22 М.
SHAPALAQ 6 серия / 3 часть #aminkavitaminka #aminak #aminokka #расулшоу
00:59
Аминка Витаминка
Рет қаралды 2,2 МЛН