Forum Discussion
Poida22
May 26, 2022Copper Contributor
Add data from unrelated table into form
Hi, im a bit stuck as im new to learning access. I have a basic form based on a table. My form is a sub assembly of a Part in the form you can add a task and minutes. I have another table that...
arnel_gp
May 26, 2022Iron Contributor
how do you Distinguish the Current rates?
do you enter the Latest date for each rate or you use Autonumber field, the maximum autonumber is the latest rate?
create first a Query (qryLatestRate) that will return the latest Rate from rate table.
using Datefield:
select Rate from yourTable where DateField = (select top 1 max(dateField) from yourTable);
using Autonumber (say, ID)
select Rate from yourTable where DateField = (select top 1 max(id) from yourTable);
then you can use Dlookup():
=Dlookup("Rate","qryLatestRate")
do you enter the Latest date for each rate or you use Autonumber field, the maximum autonumber is the latest rate?
create first a Query (qryLatestRate) that will return the latest Rate from rate table.
using Datefield:
select Rate from yourTable where DateField = (select top 1 max(dateField) from yourTable);
using Autonumber (say, ID)
select Rate from yourTable where DateField = (select top 1 max(id) from yourTable);
then you can use Dlookup():
=Dlookup("Rate","qryLatestRate")