sincronized combo box

G

Giripoduru

hi

i have two combo boxes 'category' and 'capacity'

the data in first combo box 'category' is as follows
category-A
category-B

the data in second combo box 'capacity' is as follows
200
300
400
500

the combo boxes take th values form the value list and not from any
table/query and stores the data in to a table 'tblone' which has the
following three fields
sno -- is a autono
category - text data type
capacity - number data type


here i would like the
second combo box to show me 200 and 300 if i select the category-A in the
first combo
and
the second combo must show me 400 and 500 if i select the category-B in the
first combo

i am an access beginner

suggest me pls
 
R

Regan via AccessMonster.com

hi Giripoduru

Put this code on the on change event OR afterupdate(i think)

Private Sub catagory_Change()

If me!catagory = "catagory-A" then
capacity.rowsource = "200;300"
Elseif Me!catagory = "catagory-b" then
capacity.rowsource = "400;500"
End if

end sub

Hope this helps

Regan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top