My Assistant
|
|
Feb 23 2012, 01:17 PM
Post
#1
|
|
|
New Member Posts: 16 |
Hi,
I'm trying to set up three cascading combo boxes. I have the first two set up and working but when I try to add the third I get a blank drop down list. The second combobox is a mutliple row source and for the third, I'm trying to do a single source table. Don't know much about code. My first box (cboreservoir) has the following code AfterUpdate: Private Sub cboreservoir_AfterUpdate() On Error Resume Next Select Case cboreservoir.Value Case "Burnt" cbostructurenumber.RowSource = "tblBurnt" Case "Cat Arm" cbostructurenumber.RowSource = "tblCatArm" Case "Granite" cbostructurenumber.RowSource = "tblGranite" Case "Hinds Lake" cbostructurenumber.RowSource = "tblHindsLake" Case "Long Pond" cbostructurenumber.RowSource = "tblLongPond" Case "Meelpaeg" cbostructurenumber.RowSource = "tblmeelpaeg" Case "Snook's Arm" cbostructurenumber.RowSource = "tblsnooksarm" Case "Upper Salmon" cbostructurenumber.RowSource = "tbluppersalmon" Case "Venam's Bight" cbostructurenumber.RowSource = "tblvenamsbight" Case "Victoria" cbostructurenumber.RowSource = "tblvictoria" End Select End Sub My second box (cbostructurenumber) has the following code AfterUpdate Private Sub cbostructurenumber_AfterUpdate() On Error Resume Next cbostructurename.RowSource = "Select tblstructurename.structurename " & _ "FROM tblstructurename " & _ "WHERE tblstructurename.label = '" & cbostructurename.Value & "' " & _ "ORDER BY tblstructurename.structurename;" End Sub My single source table for the third combobox is tblstructurename where [label] is a full list of the structure numbers and [structurename] is the corresponding structure name. Can anyone help me with this coding? I'm lost at this point. Thanks |
|
|
|
![]() |
Feb 24 2012, 12:49 PM
Post
#2
|
|
|
New Member Posts: 16 |
Thanks for the advice. Problem is that there is a pile of inspection and structure information I imported from an excel spreadsheet, since that was the way it was decided to record all this data originally. I suggested a database would be easier to manage so I have a hybrid type of database set up where I have some normalized tables relating to the reservoirs and unique structure id's but still have to deal with the original data that came from the spreadsheet.
Thanks again for your help. |
|
|
|
csparkes Three Levels Of Cascading Combo Boxes Feb 23 2012, 01:17 PM
accesshawaii First, I would ask about your table design. It... Feb 23 2012, 01:27 PM
Jeff B. This is only a guess, based on my interpretation o... Feb 23 2012, 01:27 PM
RAZMaddaz Here is an example of what sounds like what you wa... Feb 23 2012, 01:43 PM
csparkes QUOTE (accesshawaii @ Feb 23 2012, 03:27 ... Feb 23 2012, 02:48 PM
Jeff B. If "normalization" and "relational ... Feb 23 2012, 04:27 PM
accesshawaii QUOTE I have separate tables set up with the numbe... Feb 24 2012, 07:31 AM
csparkes QUOTE (RAZMaddaz @ Feb 23 2012, 03:43 PM)... Feb 24 2012, 09:28 AM
RAZMaddaz Awesome!!! I'm glad you like my m... Feb 24 2012, 09:32 AM
accesshawaii Glad you got it working but I would seriously sugg... Feb 24 2012, 09:34 AM
Jeff B. I'll echo Dan's comments -- you may be fac... Feb 24 2012, 11:15 AM
Jeff B. Just FYI ...
A LOT of Access "databases... Feb 24 2012, 01:08 PM
accesshawaii Jeff's advice is the way to go. The most impor... Feb 27 2012, 07:32 AM![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 19th June 2013 - 12:13 PM |