Change cbo Box row source,

R

Randy

I have two cboboxes on my form. One box selects "commodity" from
tblcommodity. The very next cbobox selects a "containertype". The problem
is I need to switch the "containertype" row source from one of two tables
depending on the selection from cbobox "commodity". If I select "Peaches"
from the cbobox "Commodity" , I need the row source to be set to
"tblcontainertypeaches"or if I select plums I need the row source to be set
to "tblcontainertypeplums". How can I do this...Thanks...Randy
 
B

Byron

Use the "After Update" event of the "commodity" combo box
us an IF statement like:

If me.cboCommodity = "Peaches" then
me.cboContainertype.rowsource = "tblcontainertypeaches"
elseif me.cboCommodity = "Plums" then
me.cboContainertype.rowsource = "tblcontainertyplumbs"
end if

HTH
Byron
-----Original Message-----
I have two cboboxes on my form. One box selects "commodity" from
tblcommodity. The very next cbobox selects
a "containertype". The problem
 

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

Similar Threads


Top