M
mezzanine1974
There are two ComboBox in a form. (ComboBx1 and ComboBox2)
ComboBox2 is providing data for a table field which is required a
value rather than NULL. Source of the ComboBx2 is coming from a query
for which ComboBx1 is a criteria. So, when you select a value in
ComboBx1, source of the ComboBx2 is changing accordingly.
For OnChange() and AfterExit() events of ComboBx1, I write these
simple codes to update the ComboBx2 automatically:
Form_Form1.ComboBx2.Value=Null
Form_Form1.ComboBx2.Requery
Since ComboBx2.Value can not be NULL because it is required a value,
first line of the code cause en error. How can I clear the ComboBx2,
while ComboBx1 is onChange() or AfterExit().
Thanks
ComboBox2 is providing data for a table field which is required a
value rather than NULL. Source of the ComboBx2 is coming from a query
for which ComboBx1 is a criteria. So, when you select a value in
ComboBx1, source of the ComboBx2 is changing accordingly.
For OnChange() and AfterExit() events of ComboBx1, I write these
simple codes to update the ComboBx2 automatically:
Form_Form1.ComboBx2.Value=Null
Form_Form1.ComboBx2.Requery
Since ComboBx2.Value can not be NULL because it is required a value,
first line of the code cause en error. How can I clear the ComboBx2,
while ComboBx1 is onChange() or AfterExit().
Thanks