Hi hoping someone can help.
I have a main form with a combo box on the main form with 3 options Shanghai, Ningbo, Qingdao
A sub form with a combo box from an imbedded query with multiple columns Vessel, Voyage, ETA, ETDShanghai(Column3) , ETDNingbo(Column4), ETDQingdao(Column5). These date fields have different dates based on the vessel and voyage selected.
If shanghai is selected on the main form the ETD field in the subform should be the ETDShangai Value as being column(3).
Lines for Voyage and ETA work correctly. The last 3 lines i need help!
Private Sub VesselName_AfterUpdate()
Me.Voyage = Me.VesselName.Column(1)
Me.ETA = Me.VesselName.Column(2)
Parent.OriginPort. "Shanghai" Then Me.ETD = Me.VesselName.Column(3)
Else
Parent.OriginPort. "Ningbo" Then Me.ETD = Me.VesselName.Column(4)
Else
Parent.OriginPort. "Qingdao" Then Me ETD = Me.VesselName.Column(5)
End Sub
I have a main form with a combo box on the main form with 3 options Shanghai, Ningbo, Qingdao
A sub form with a combo box from an imbedded query with multiple columns Vessel, Voyage, ETA, ETDShanghai(Column3) , ETDNingbo(Column4), ETDQingdao(Column5). These date fields have different dates based on the vessel and voyage selected.
If shanghai is selected on the main form the ETD field in the subform should be the ETDShangai Value as being column(3).
Lines for Voyage and ETA work correctly. The last 3 lines i need help!
Private Sub VesselName_AfterUpdate()
Me.Voyage = Me.VesselName.Column(1)
Me.ETA = Me.VesselName.Column(2)
Parent.OriginPort. "Shanghai" Then Me.ETD = Me.VesselName.Column(3)
Else
Parent.OriginPort. "Ningbo" Then Me.ETD = Me.VesselName.Column(4)
Else
Parent.OriginPort. "Qingdao" Then Me ETD = Me.VesselName.Column(5)
End Sub