My objective is to populate an end date, based on the start date of the next record for an employee. If no next record, show 12/31 of same year as start date. My question is in two parts. 1) should I use a dlookup, and 2) why is my most basic dlookup giving me an error? Am I using wrong syntax? I thought I would start simple, then play around to see if I can make this work. But even my simple attempt is not working. If there is a better way, I would love to know. Thx for any help!
Table: "ProRationDates", contains [EEID],[FullName],[StartDate]
Query: "ProRationDates Sorted" based on ProRationDates table, contains same fields except 1) I've renamed them [prsEEID],[prsStartDate], and 2) the query is sorted by EEID then StartDate (so I can hopefully do some sort of FindNext function to retrieve the next StartDate for the employee. My logic is that I believe I can identify the current EndDate by using next StartDate -1.
Query2: "Query2" based on ProRationDates table, with an added field called EndDate: DLookUp("[prsStartDate]","ProRationDates Sorted","[prsEEID]=" & [EEID]). But this returns an "ERROR".