Solved DLOOKUP gives a date value instead of a numerical value (1 Viewer)

Mercy Mercy

Member
Local time
Today, 23:02
Joined
Jan 27, 2023
Messages
87
Hello everyone how do I use dlookup in a report to refer to a numerical field in a query.

When I used the following it gives me the date value
31 December 1899


=DlookUp("classrank","qryRanking","STUDENTID=" & [StudentID])


Kindly assist me.

It gives me a date 31 December 1899
 

ebs17

Well-known member
Local time
Today, 22:02
Joined
Feb 7, 2020
Messages
1,949
A date is internally a number, where 31 December 1899 corresponds to the number 1.

Possibly the field that takes the return value has a formatting with date format, so this affects the display.
 

plog

Banishment Pending
Local time
Today, 15:02
Joined
May 11, 2011
Messages
11,646
Or you screwed up your query and named the date field classrank and the rank field ClassDate.

Open your query and check to make sure it has the correct values in classrank, then manually find the StudentID value for the one you are using the DLookup on.
 

Mercy Mercy

Member
Local time
Today, 23:02
Joined
Jan 27, 2023
Messages
87
A date is internally a number, where 31 December 1899 corresponds to the number 1.

Possibly the field that takes the return value has a formatting with date format, so this affects the display.
Hahahahhahaaaaaaaaa. It is very true. Thanks. I like this forum.
 

Mercy Mercy

Member
Local time
Today, 23:02
Joined
Jan 27, 2023
Messages
87
Or you screwed up your query and named the date field classrank and the rank field ClassDate.

Open your query and check to make sure it has the correct values in classrank, then manually find the StudentID value for the one you are using the DLookup on.
Very true. Thanks.
 

Users who are viewing this thread

Top Bottom