Hello Everyone!
My EmployeeData tbl contains a field PPID_Data (number field). I am using this field to lookup values from another table called PayPeriods, which contains all the data for the year 2021.
I am looking for the best way to have the [StartDate] and [EndDate] update on the form, or using a query, when the user selects the PayPeriod [PP] from the dropdown.
I was able to successfully get the unbound field [SDate] to populate on the form using the code below, but could never get the [EDate] to work. I'm sure I'm missing something simple, but would be happy to learn if there is a better way to reference the fields.
My EmployeeData tbl contains a field PPID_Data (number field). I am using this field to lookup values from another table called PayPeriods, which contains all the data for the year 2021.
Code:
SELECT PayPeriods.PPID, PayPeriods.PP, PayPeriods.StartDate, PayPeriods.EndDate FROM PayPeriods ORDER BY PayPeriods.PP;
Code:
PPID PP StartDate EndDate 1 01 - Week 01 21-Dec-21 27-Dec-20 2 02 - Week 03 04-Jan-21 10-Jan-21
I was able to successfully get the unbound field [SDate] to populate on the form using the code below, but could never get the [EDate] to work. I'm sure I'm missing something simple, but would be happy to learn if there is a better way to reference the fields.
Code:
Private Sub PPID_Data_AfterUpdate() Me.SDUnbound = Me.Combo800.Column(2) Me.EDUnbound = Me.Combo800.Column(3) End Sub
Comment