Full Version: Cascading Combo Boxes
UtterAccess Forums > Microsoft® Access > Access Forms
TheCaptain1
Hello UA members
posted a thread awhile back about this and got some great input. However, i'm still at a loss of figuring this out. I've done this before and can't figure it out again. I've attached my sample DB for viewing. Take into consideration that i'm very new at this and any help is greatly appreciated.
On my form i have Commpany and Section. When i select say "Engineers" from the "company" combo box and move down to the "Section" combo box i want to be able to see only listed for "Engineers". Any input or advice on this and also on the structure of the DB? Thanks in advance from Iraq, U.S. Marines.
TheCaptain1
norie
I've downloaded the database and it seems to be doing what you want.
hat's the problem? Am I missing something?
TheCaptain1
The problem is that it list the exact same 'Sections' no matter what you choose in the "Company" combo box. Each company has their specific 'Sections'. Hope that makes sense. Thanks for your quick response.
heCaptain1
norie
Weird.
just downloaded the file again.
The first time it worked and now it doesn't.
Anyway, you probably want to look at Requery and the BeforeUpdate event.
TheCaptain1
Do i do the requery for both combo boxes? and if so, should i put them in the "On Enter" event and "beforeUpdate" event? Remember i'm very new to this. I"m following you so far though. thanks again for all your help.
heCaptain1
TheCaptain1
Hello UA Members,
I'm still working on this form, which i've now called "frmOwner1". I've added some things which work and that i'll need. What i'm having trouble with is the following combo boxes: "SectionID" It shows all the records in the pull down menu but it will only select the first record. The same is true for the "NomenclatureID", "Tamcn", "IdNumber", "NSN". Any thoughts on this? I know it's probably something simple but with my limited experience i can't figure it out. Basically, it's not choosing the right record that is in the table (tblNomenclature) I"ve attached it again for anyone that can help me out. It's different from the first version originally attahced. Thanks in advance for any help/advice.
TheCaptain1
jmcwk
Captain,
heck Out the attached maybe it will help you out.
TheCaptain1
John,
Thanks for the example. I'll be sure to check it out. If i have any further questions or can't figure it out i'll be sure to post back. From what you saw in my DB did it look like my table were structered right and the relationships right? Any help/input is greatly appreciated. Thanks again. I'm sure i'll be back.
TheCaptain1
jmcwk
Captain,
o be honest with you I really did not look at it that closely as I am at work and did not have time I will look at it when I get home this evening however and see what I can find out. What exactly is it you are trying to do apart from the Combo issue? I am not real familiar with the terminology you are using in some of your controls other than of course the nomenclature, type etc. Is it some type of Inventory for a Logistics Company going on Mobility or a deployment? Just curious but the mre detail the better in respect to Structure etc.
TheCaptain1
John,
Thanks for the quick reply. The DB is being built for me to track vehicles/equipment. I'm a mechanic and run the shop. Within my unit (i'm in the military) there are many "company's and within the company there are many sections or platoons. Hope that helps on those two combo boxes.
The others deal directly with the equipment. Type refers to 5 Ton, 7 Ton, Hummers, etc. Nomenclature is the military short name for that Type of vehicle. For example: I have a Hummer and it's short name could be M998 as one example. There LOTS of different variations for each "Type". Each "type" and "nomenclature" has it's own TAMCN, this is just a control number assinged to a group of vehicles and each Tamcn has an I.D. # something like the VIN on your car. Then to break it down further each vehicle has a "National Stock Number" (NSN). This 13 digit number is used when ordering parts for that specific vehicle. So in a nut shell it would look like this:
Company: Support
Section: Motor Transport Maintenance (MT Maint.) for short (When Support Company is selected from
from above i only want those selections to appear in the combo box and be able to choose)
Type: 7 Ton (This combo box is woking fine right now)
Nomenclature: AMK23 (one of the many varieties of 7 Ton's) (Again, when i select a specific type i only
want those associated that type to be present and select the one i want)
Tamcn: D0003 ( this combo box should work directly off the input from the "nomenclature" and only
me one choice) If nomenclature = AMK23 then the only TAMCN associated with it is D0003
I.D. # 10629C (Same as above for TAMCN)
NSN: 2320-01-530-5676 (Same as above for TAMCN)
Hope this isn't be "barney style" or not enough information. If you still don't understand let me know and i'll try it a different way. Again, i really appreciate your help in this. Thanks in advance
The Captain1
jmcwk
Captain,
Thanks for the input I will take a look at it when I get home this evening am on the West coast and it is 11:30 hrs here so it will be awhile before I get back to you.
jmcwk
Captain,

tblSerial and the Caption of Serial# What is That? Should the Serial# NOT be listed within your Nomenclature Table? Just trying to sort things out. I see no Serial # 532456 in your Nomenclature or tblSerial. Do you have Serial #s for the vehicles in your Nomenclature table?
Edited by: jmcwk on Fri Jun 9 16:54:06 EDT 2006.
TheCaptain1
John,
I used Serial # in the caption for the User but just used "Serial" in the table cause i'd heard it was a bad idea to put in symbols. The reason i don't have the Serial# in the Nomenclature table is because each one of those fields can be broken down more and the Serial # can't. Trying to be good about normalization if i'm understanding it right. If i'm way off base don't hesitate to let me know. The Serial # 532456 was just a number i made up when i sent that post as an example. So no it's not an actual vehicle serial # Hope that helps the madness going on in my brain.
Captain
jmcwk
Captain,
You are correct about using# / etc in the naming of a field within a table what I am trying to determine is how the Serial field Serial# caption relates to the records in the Nomenclature table.You have 55 records in the tnlSerial yet there are 101 records in the tblNomenclature something is definitely wrong here or I am missing the obvious.
TheCaptain1
John,
Ok, i think i understand your question/concern here. In the Nomenclature table there are more records due to the fact that i have listed all the Types of equimpent i've ever encountered. That doesn't mean we have any here presently but i put them in the table in the event we get that that piece of gear. For example: In the Nomenclature table you see "5 ton". We don't have any 5 ton's here but someday we may get some. Same is true for the "Motorcycle, Lube Unit, Dolly's, etc. In the Serial table there is 55 records because currently i own/service 55 pieces of serialized gear that we actually have on hand. Hope that makes sense.
Captain
TheCaptain1
John,
How that i look at it more it probably would'nt make a difference if the Serial# was in the Nomenclature table. What's your thoughts on that?
Captain.
jmcwk
OK you have those 55 pieces of equipment and 55 records so those 55 records should also include the BedTypeID,TypeID,NomenclatureID,CompanyID,etc. unless you intentionally left them out?????? As I see it the Nomenclature table like you say is a listing of the Inventory of Equipment you could possibly service that is 1 piece of equipment and thre are thousands of jeeps for example but they all have different serial numbers the Nomenclature table as it is is fine and I think the Serial Field in the table is fine because it is not tied to a specific Vehicle Type
Edited by: jmcwk on Fri Jun 9 17:35:57 EDT 2006.
TheCaptain1
Are you talking about in the Serial table? If so, i haven't yet entered all the data for each serial number yet. Also there is going to be more data associated each Serial number. I have all the tables made so far.
Could it make more sense to break down the Nomenclature more? For example: Should "Type" be in a table lookup by itself? Also like Tamcn for example. There can be more than one "Nomenclature" with the same Tamcn. Id Number can only be associated with one "Nomenclature", "NSN" can only be for one "Nomenclature" as well. Type can have many "nomenclatures" for example there are several different varieties (nomenclature) of the 5 ton.
Not sure if that helps or adds more stress. If you'd like i can send the new DB with all the tables in it.
Thanks again for all your help
Captain
jmcwk
frown.gif frown.gif frown.gif
epends on what detail you want but it sounds like they are needed somewhat like a family tree how far back in the Ancestry do you want to go? It Could go to the Nth degree for example a part (transmission) that you repair has many parts etc. Do not want to discourage you as you are on the right track. Hopefully I am not discouraging you or have your head spinning!
TheCaptain1
John,
Actually i already have a table for "Type", tlkupType that has the different types of equipment. The "type" in the Nomenclature table is a number but i set the lookup to combo box so wouldn't get confused on seeing numbers in the table. I think i have it set right unless you can think of something else. And no you don't have my head spinning at all or discouraging me. I love to learn this stuff.
Captain
jmcwk
Have you added any tables since you posted your attachment? I think your structure is OK the only thing that was really throwing me was your tblSerial and the empty fields. What is UOC and EOTC in the Nomenclature Table?
TheCaptain1
Yes, i've added quite a few tables actually. i'll post it. The UOC is "Usable on Code" it's a code used for ordering parts. For example on the HUMMERS there are many different variations. M998, M1114, etc. Each "Nomenclature" has a different UOC to make sure you order the right parts say for the transmission as they can be different. EOTC is....Well "M" means it has a odometer, H = Hours, = D=Days, etc. It's more for when we close out the job repair order in the computer system. If that code is wrong when inputed the job won't close on the next day's report.
Captain
jmcwk
OK As I see it you need another table/s have not opened you new attachment (YET) your Nomenclature table should only include the pertinent fields for that Vehicle as if I understand you correctly < amd you need a UOC table and an EOTC table. As it is you will get in a HMMVVV that may have a different UOC than H14 as you have listed in the Nomenclature table.The UOC, EOTC etc. can be included in the detail side of your table tblNomenclature is your one side tblNomenclature Detail is the many side of a one To Many relationship. Does this make any sense to you?
TheCaptain1
Ok, so make a table say tlkupUOC and tlkupEOTC and put in the codes for each? I understand the one to many relationship. It is kinda confusing but making some sense also. Do i need a table that will cover all my tables PK's that pertain to the serial # of the vehicle since everything pretty much revolves around the serial #, type and nomenclature?
aptain
jmcwk
Captain,
This and This And This Is good reading
TheCaptain1
John,
Thanks for the reading material. I believe i've read these before and have them in a binder. Unfortunaely, they are back in the states. It's always good to have it to refresh the brain. I'll read them over again and try and fix anything that needs fixing before i post the DB Again. Thanks again.
TheCaptain
jmcwk
Captain,
ttached is a start much,much to go open the form frmdata and take a look at it also open the query qrydates these are examples of date formats you can use troughout the DB I did changes the Julian Date Controls as you will see in your tables reason was if a user needs the date that reflects the Julian it will be available as well they will also be easier to use down the road with reporting calculations etc. hope you don't mind also if you double click the remarks control in the form it will open nothing special just something if you were not aware it was thee it may be overlooked????? If you have added any tables or added data to any of the existing tables it would help me proceed. Hvaing somewhat of a hard time associating what goes with what other than the Master/Child Links in the table field names.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.