Not in list property as well as Cascading combo boxes?

not a code fan

Registered User.
Local time
Today, 14:33
Joined
Nov 21, 2004
Messages
32
Thanks to people's help on here and another site i have worked out how to create cascading combo boxes and also how to use the not in list property. The puzzle i am currently working through is how to put the two together.

It would seem that when you have cascading combo boxes something affects the not in list property. I have attached a test database that i have created (that i hope to later adapt to my proper database when i have it sussed).

I don't have a lot of records in the database right now but as you can see from the first record i have successfully made all the combos cascade properly. Some however work with the not in list and some don't. I can't see anything wrong with the code so i figure it must be something else, any ideas. Oh and i don't mind if anyone wanted to pinch what i have made for anything.

By the way i am new to all this code stuff so i hope you will be able to explain the problem in idiot proof language.
 

Attachments

Last edited:
This logic will not work for every case. In Russia there is no such thing as county or state, we have regions, in Germany there are lands. In France provinces. So the logic you are trying to implement will not work.
The reason is because all the subsequent tables like state, county, city, suburb require the Fkeys. Besides here is the reason the code worked in some cases ( in fact only in country update ) and didn't work for others.

-------------------------------------------------------------

With rs
.AddNew ' prepare to add a new record
.Fields("State") = NewData ' add unfound data into field
.Fields("CountryID") = Me.ComboCountry
.Update ' update the table
.Close ' close the recordset object
--------------------------------------------------------------

Anyway if you are sure that sequence of events will be the same for every case i have corrected the code a little bit. It works now. :)
 

Attachments

Users who are viewing this thread

Back
Top Bottom