Dlookup function

molletica

New member
Local time
Tomorrow, 00:26
Joined
Oct 7, 2021
Messages
2
Hi Friends,
I am just learning Access. could anyone help me with the D lookup function?

I have two tables one has Month Name and Month Number ( MonthT) - Ex Jan = 1, Feb = 2 like that
One more table contains actual data when the Month name is one of the fields (ActualT).
I am trying to run a query to bring Month No against Month name in Table Actuals.

could anyone help in how to do that?
 
Hi. Welcome to AWF!

You shouldn't need DLookup(). You should be able to join the two tables in your query.
 
You can extract the month number from a date field using inbuilt functions in Access - no real need of the table;

In a query -
MnthNo : DatePart("m",[YourDateField])
MntName : MonthName(DatePart("m",[YourDateField]))
 
Actually, I have other tables wherein I have to look up values in the Query. This is one example.
example of other fields:- I Have Account number in the Actual data table and the corresponding Description in another table
 
The best route would be to join the tables in the query. Same goes for the other "Lookup tables" - something like
1633619307940.png
 

Users who are viewing this thread

Back
Top Bottom