RobSchultz
Programmer
I have an accounts table and a balance history table. For discussion lets say the tables are set up as follows:
tblAccounts
accountID (autonumber)
isActive (yes/no account is active)
tblBalances
balanceID (autonumber)
accountID (FK to tblAccounts.accountID)
balance (currency)
lastUpdated (date/time)
Every day the latest and greatest balances are pulled in and appended to the tblBalances table.
How would a query be constructed to show only the most recent balance for all accounts (whether a balance existed or not) without resorting to a (ugh) mostRecent checkbox? I cannot get my brain around what seems to be a solvable problem.
The output query would ideally have accountID, balanceID, balance and lastUpdated.
TIA,
Rob
-Focus on the solution to the problem, not the obstacles in the way.-
tblAccounts
accountID (autonumber)
isActive (yes/no account is active)
tblBalances
balanceID (autonumber)
accountID (FK to tblAccounts.accountID)
balance (currency)
lastUpdated (date/time)
Every day the latest and greatest balances are pulled in and appended to the tblBalances table.
How would a query be constructed to show only the most recent balance for all accounts (whether a balance existed or not) without resorting to a (ugh) mostRecent checkbox? I cannot get my brain around what seems to be a solvable problem.
The output query would ideally have accountID, balanceID, balance and lastUpdated.
TIA,
Rob
-Focus on the solution to the problem, not the obstacles in the way.-