Default values based on a field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform that has combo boxes. The row source values for these combo boxes is based on a value from a field in the main form. This works fine when the correct value in the main form is selected. An example would be if I select "Day shift" the start time field is populated with the times for the day shift to start. If I select "Day Shift" but go back and change it to "Night Shift" the row source values in the combo box are still for the day side. It is only changed when I close and reopen the form.
 
If the RowSource of the ComboBox depends on the value
selected in the "Shift" Control, i.e. the RowSource is a
parametrised Query, then use the AfterUpdate Event of
the "Shift" Control to requery the ComboBox in the Subform.

HTH
Van T. Dinh
MVP (Access)

-----Original Message-----
I have a subform that has combo boxes. The row source
values for these combo boxes is based on a value from a
field in the main form. This works fine when the correct
value in the main form is selected. An example would be if
I select "Day shift" the start time field is populated
with the times for the day shift to start. If I
select "Day Shift" but go back and change it to "Night
Shift" the row source values in the combo box are still
for the day side. It is only changed when I close and
reopen the form.
 
Back
Top