G
Guest
I have a value in a text box that is built on three choices in three combo
boxes
combobox1.value + combobox2.value + combobox3.value built on "AfterUpdate"
It works nicely, now the employees would like to enter the value in the
text box and have it work backwards to populate the comboboxes.
I've been playing with this, but it seems to set the first one, but the
other ones are left blank. Is there an easier way?
Any help is greatly appreciated.
(The combo boxes are kept notvisible if not needed, and this code is run
from a button on click after a value is entered into "Section")
Me!Ofunction.Visible = 1
Me!Ofunction = DLookup("Functionno", "Function",
"Function.FunctionNo=Left([Forms]![OrdersUnbound]![Section],2)")
Me!County.Visible = 1
Me!County = DLookup("County", "County",
"County.CountyNum=Mid([Forms]![OrdersUnbound]![Section],3,2)")
Me!EntityType.Visible = 1
Me!EntityType = DLookup("EntityType", "LocalEntity",
"LocalEntity.EntityNum = Right([Forms]![OrdersUnbound]![Section],2) AND
LocalEntity.County=Mid([Forms]![OrdersUnbound]![Section],3,2)")
boxes
combobox1.value + combobox2.value + combobox3.value built on "AfterUpdate"
It works nicely, now the employees would like to enter the value in the
text box and have it work backwards to populate the comboboxes.
I've been playing with this, but it seems to set the first one, but the
other ones are left blank. Is there an easier way?
Any help is greatly appreciated.
(The combo boxes are kept notvisible if not needed, and this code is run
from a button on click after a value is entered into "Section")
Me!Ofunction.Visible = 1
Me!Ofunction = DLookup("Functionno", "Function",
"Function.FunctionNo=Left([Forms]![OrdersUnbound]![Section],2)")
Me!County.Visible = 1
Me!County = DLookup("County", "County",
"County.CountyNum=Mid([Forms]![OrdersUnbound]![Section],3,2)")
Me!EntityType.Visible = 1
Me!EntityType = DLookup("EntityType", "LocalEntity",
"LocalEntity.EntityNum = Right([Forms]![OrdersUnbound]![Section],2) AND
LocalEntity.County=Mid([Forms]![OrdersUnbound]![Section],3,2)")