Cascading Lists not working

jaffar2000

Registered User.
Local time
Today, 12:58
Joined
Apr 15, 2012
Messages
28
Hi,

I tried cascading lists by a single row source table method but with no luck.

I created a table named Dep_Wing.
I added 2 combo boxes and named them cboDep & cboWing (the dependent combo box).
In the row source of the cboDep I put sql to select the department names from Dep_Wing and in its AfterUpdate event I put the following code:

On Error Resume Next
cboWing.RowSource = "Select Dep_Wing.wing " & _
"FROM Dep_Wing " & _
"WHERE Dep_Wing.department = '" & cboDep.Value & "' " & _
"ORDER BY Dep_Wing.wing;"


I can select a value from cboDep but the cboWing stays empty.
The same issue exists when using Multiple Row Source Tables method.

Please help.
Jan.
 
Try adding Me.cboWing.Requery at the end of your code.
 
Tried it now and still no good.
The funny thing is that if I do the same on a new access file, it is working just fine, but if I add those boxes to an existing form I have on another access file...it is
not working.

Any idea?
 
No matter what I do and which method I choose, I can't get it done on an already existing file/form.
It is working only if I create a new access file.
Help...
 
There is a free video tutorial on cascading combos that should identify all the settings and rationale here
http://www.datapigtechnologies.com/flashfiles/combobox2.html


You could post a sample database, preferably mdb(2003), without any confidential/personal info - just enough info to show the form and the issue. Someone may do analysis and get back to you.
Just an alternative.
 
thank but I already watched that video.
It is nice but doesn't show the tables structure and other vital info.
I followed this video and managed to do the same in a new file but not on an existing one even that I copied all the items one by one.
 

Users who are viewing this thread

Back
Top Bottom