malharbarai
asked on
Change value in 2nd combo
hi all
i have to 2 combo's in my form both populated from database, but when a particular value is selected from combo1, values in combo2 should change corresponding to the value in combo1...
how do i achieve this...is it possible...??
at the moment its giving me 'Run-time error 3709' - 'Operation is not allowed on an object refrencing a closed or invalid connection'...
tia
MB
i have to 2 combo's in my form both populated from database, but when a particular value is selected from combo1, values in combo2 should change corresponding to the value in combo1...
how do i achieve this...is it possible...??
at the moment its giving me 'Run-time error 3709' - 'Operation is not allowed on an object refrencing a closed or invalid connection'...
tia
MB
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi malharbarai,
This old question (QID 20557021) needs to be finalized -- accept an answer, split points, or get a refund. Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
This old question (QID 20557021) needs to be finalized -- accept an answer, split points, or get a refund. Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
ASKER
this is what i figured out as the solutions
connString = "select area.serno,area.area,city. serno from area,city where city.city='" & cityVal & "' and area.city_code=city.serno order by area.area"
changeAreaRs.Open connString, ADOConn, adOpenDynamic, adLockReadOnly
While Not changeAreaRs.EOF
areaCombo.AddItem changeAreaRs("area").Value
areaCombo.ItemData(areaCom bo.NewInde x) = changeAreaRs("area.serno") .Value
changeAreaRs.MoveNext
Wend
changeAreaRs.Close
the solution is much like wat DHAEST suggested, so I would surely like to award him those points
thnx
connString = "select area.serno,area.area,city.
changeAreaRs.Open connString, ADOConn, adOpenDynamic, adLockReadOnly
While Not changeAreaRs.EOF
areaCombo.AddItem changeAreaRs("area").Value
areaCombo.ItemData(areaCom
changeAreaRs.MoveNext
Wend
changeAreaRs.Close
the solution is much like wat DHAEST suggested, so I would surely like to award him those points
thnx
Thanks.
I'm glad that the problem is solved now
I'm glad that the problem is solved now
ASKER
Much close to my requirement.
Thnx indeed
Thnx indeed
Normally.
'Run-time error 3709' - 'Operation is not allowed on an object refrencing a closed or invalid connection'...
This Error Occur When You Are Trying To Open a recodset Thru Inavlid Connection object. So Please Check Your Connection Object Status. Most Propably You closed the Connection Object Before Trying to Excute Sql statement. Plz Check it.
Nambi