In AC97, I have a form with a subform. The combobox on the mainform has the following event code
When cbxTrainNo is updated with the TrainNo of the first record in tblTrainOrder, the subform shows the desired info from table TrainOrder. However, when any other TrainNo is selected, then no info is in the subform. If I delete the first record in TrainOrder, then select what was the second TrainNo, the info for what is now the first TrainNo shows in the subform.
Why doesn't the subform update when a TrainNo other than the first in the table TrainOrder is selected?
Thanks,
Brian
Code:
Private Sub cbxTrainNo_AfterUpdate()
Me.tblTrainOrderSubform.Form.Requery
End Sub
When cbxTrainNo is updated with the TrainNo of the first record in tblTrainOrder, the subform shows the desired info from table TrainOrder. However, when any other TrainNo is selected, then no info is in the subform. If I delete the first record in TrainOrder, then select what was the second TrainNo, the info for what is now the first TrainNo shows in the subform.
Why doesn't the subform update when a TrainNo other than the first in the table TrainOrder is selected?
Thanks,
Brian