Cascading Combo Boxes

GarageFlower

Registered User.
Local time
Today, 16:32
Joined
May 20, 2004
Messages
108
Right I have followed one of the sample databases and modified it to create cascading combo boxes like i needed.

Now all i need to do is use them in the context i need.

Basically I have country, region and sub region. These cascade to each other in the form which has been created. If you select a country, then in region you in only see the regions in that country, etc.

What i need is to be able to use the cascading combos boxes in conjunction with the "Location table". So someone can put in a project number and then use the cascading combo boxes to to chose the country, region and sub region boxes saving all of the data into the location table .

Please can someone help, as it took me allmost three hours to create the cascading combo boxes but now i cant even use them for what i wanted them for,.

Many Thanks
 

Attachments

Hi, its just a case of setting the datasource of your combo form to be the locations table, and then setting the datasource of the country, region and subregion fields to the correct fields in the table.

I have made changes to your sample so you can see what i mean

Hope this solves the problem.

Sue
 

Attachments

Sue , Will You Marry me ?
Thank you i'm really grateful for that...

I know i sound really dense here but can you explain in lamens terms exactly how you did that?

Did you have to amend the code, or is there an option you use in properties in design mode for the form?

Thanks
 
I have encountered more problems which are unexpected.

I am using the form we have been working on to be used as a sub form linked to another form.

I have uploaded the db with the extra forms and tables.

Basically the cascading combo boxes are not working now that i have used it as a sub form.

Any ideas why?
 

Attachments

Sorry already happily married!

Glad to be of help

In answer to your first post, I opened the form in design view, opened the properties box selected the data tab . From the drop down list I select the table location as the datasource for the form.

Now that the form has a datasource, for each of the combo boxs, I clicked on it and again in the data tab of the properties box, I set the datasource to be the correct field in the lovcations table. No code involved at all!

The problems that you are encountering now the form is a subform, are because the criteria you have set in your queries refer to the wrong form.

I have now set them to be correct, but will explain how I did it.

Because the syntax when refering to controls on subforms can be confusing and difficult to understand and remember, I like to get access to do that bit for me.

Open the query from your combo box with the form in design mode, ( click the ... at the end of the recordsource line in the conbo box's property box.

In the column where you want the criteria, right click the box and select build. This opens the expression builder.

You want to set the criteria according to a value on the form so in the left hand sides, doubleclick forms, loaded forms, mainform, subform, then in the middle column click on field list. In the right column click on the name of the field you want to use in the criteria, then click paste to put the expression in the window at the top. make sure you remove any <exp> that might appear, just means it thought you wanted to do something with it. This means your syntax must be correct according to access.

Close the expression builder, then click on another field in the properties box, otherwise it tends to forget what you have just done, and you have to do it again!

Hope this all makes sense, good luck

Sue.
 

Attachments

Sue or anyone please help

I am doing a very similar thing but have come unstuck again

Have followed the instructions but it is just not working

I have uploaded the database so you can take a look and see why it is not working

Please could you let me know how i could get this working. thank you
 
Cascade Combo boxes

need help I can email you some samoke files on this to you I want to create a Cascade Combo boxes CD Group and CD NAme only display the ones related to thta CD Group.

I can create coding but it get's me so fusturating because of all the error messages I have no knowlegde of it but I can do everything else in acess without the coding.

CD Group
J Richard Szermany
Select from List

CD NAme

All things bright and Beautiful
For the beauty of the Earth
Displays all CD REcords does not filter them out
I can send you a copy of the Acess database in a 2003 or 2000 format.

Thanks,

Mike Van Der Stad
 
Cascade Combo boxes

I need to create combo boxes when it selects from a list it only displays back related records like CD Group and CD Name displays only values related to that CD Name related to that Group.

Just as a user would select BookCase Types of Bookcases Computer Furniture Type of Computer Desks that would display related parts. Not all the parts in the database.

I spent many hours modifying relationships and got no where, I need any help I ca nget
email me at mikevds@optonline.net
For Screenshot attathments
 
Sue Powell,

Thanks very much for your post. I've been struggling for a couple of days to get three combo boxes to link successfully and finally found this post and sample data base. Despite asking on the forum and getting some excellent help, I couldn't work it out.

Thanks again
 
Can someone help me – I need [FONT=&quot]Cascading Combo Boxes on my form but I just can’t make it work.
Maybe it’s a database construction flaw. I have many streets with many different types of traffic light controller devices. One device per street. Every different device has different set of errors.[/FONT]

[FONT=&quot]The Form is IZVESTAJ that is the table that has to have the information about the name of the street and the error that occurred.

[/FONT]
[FONT=&quot]The relationship is like this RASKRSNICA (street) is connected to UREDJAJ (device) that is connected to Greske (errors).

If anyone can help me I'll send him my db

Pic of the relationship is odnosi-forum.jpg

Thanks for your help
[/FONT]
 

Users who are viewing this thread

Back
Top Bottom