No all that code is the After Update of the Employee combo (CboEmployees).
The Load() code is on its own.
My Date combo looks like this so far but it still doesnt refresh either when selecting a new employee.:
My whole code for the form looks like:
The Load() code is on its own.
My Date combo looks like this so far but it still doesnt refresh either when selecting a new employee.:
Private Sub CboPaymentDate_AfterUpdate()
Me.TxtGrossPay = Me.CboPaymentDate.Column(7)
Me.TxtExpenses = Me.CboPaymentDate.Column(6)
Me.TxtPaymentID = Me.CboPaymentDate.Column(1)
LngPaymentID = Me.TxtPaymentID
End Sub
My whole code for the form looks like:
Option Compare Database
Private Sub CboPaymentDate_AfterUpdate()
Me.TxtGrossPay = Me.CboPaymentDate.Column(7)
Me.TxtExpenses = Me.CboPaymentDate.Column(6)
Me.TxtPaymentID = Me.CboPaymentDate.Column(1)
LngPaymentID = Me.TxtPaymentID
Me.TxtGrossPay = Null
Me.TxtExpenses = Null
Me.TxtPaymentID = Null
End Sub
Private Sub CboEmployees_AfterUpdate()
Me.TxtNI = Me.CboEmployees.Column(2)
Me.TxtBand = Me.CboEmployees.Column(3)
Me.TxtPensionRate = Me.CboEmployees.Column(4)
Me.TxtPCT = Me.CboEmployees.Column(5)
Me.TxtNonCont = Trim(Me.CboEmployees.Column(6) & " ")
Me.TxtID = Me.CboEmployees.Column(0)
LngEmployeeID = Me.TxtID
Me.CboPaymentDate.RowSource = "Select [Session Date] From QryHistory Where [GPID] =" & Me.CboEmployees & " Order By [Session Date] DESC;"
Me.CboPaymentDate.Requery
End Sub
Private Sub Form_Load()
LngEmployeeID = 0
LngPaymentID = 0
Me.CboEmployees.SetFocus
Me.CboPaymentDate.SetFocus
End Sub