Change cbo Box row source,

  • Thread starter Thread starter Randy
  • Start date Start date
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
 
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
 
Back
Top