I have 2 tables
Table one with accounting transactions that include a key that can be joined with another table that has status at a particular date in time. I need to select the dATE IN TABLE 2 that is closest to the transaction date in table 1.
For example
Table 1
acct key datetran
ABCD 10/31/2016
ABCD 2/8/2016
Table 2
Acct key ORIG_VAL
NEW_VAL TBL_LAST_DT ABCD A 3/4/2013 14:25 ABCD C AT 12/30/2013 10:23 ABCD AT WW 12/30/2013 10:23 ABCD WW 2/6/2017 13:47
Results I want to see
ACCTKey datetran orig_val New_val
ABCD 10/31/2016 AT WW
ABCD 2/8/2017 WW
Basically selecting the row on table 2 where the transaction date > the TBL_LAST_DT on table 2 and the transaction date on table 1 has to be less than the date alson on table 2 if they are multiple records
Can this be done in Access or do I need to create SQL to solve this issue
Thank you
Renetta