By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,778 Members | 1,318 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,778 IT Pros & Developers. It's quick & easy.

which is the output format of a dlookup?

P: 5
Hi,

I've got this instruction in a column of a query:

DLookUp("[SumaDePUNTOS]","qryPuntospORPescador","APELLIDO='" & [APELLIDO] & "' AND NOMBREPESCADOR ='" & [NOMBREPESCADOR] & "'")

I need to sort out the records of the column in "numerical" ascending order. However, the results of the DLookUp function are converted into text. The records in the field "SumaDePUNTOS" in the query "qryPuntosPorPescador" are "numbers" and I need the DLookUp function to return "numbers"

Is there anything regarding the DLookUp that I'm missing? Is there any way to convert the text into numbers by adding something like Format(DLookUp...)
I don't know how the format function works either.
Thank you very much
Mar 18 '07 #1
Share this Question
Share on Google+
3 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
Hi,

I've got this instruction in a column of a query:

DLookUp("[SumaDePUNTOS]","qryPuntospORPescador","APELLIDO='" & [APELLIDO] & "' AND NOMBREPESCADOR ='" & [NOMBREPESCADOR] & "'")

I need to sort out the records of the column in "numerical" ascending order. However, the results of the DLookUp function are converted into text. The records in the field "SumaDePUNTOS" in the query "qryPuntosPorPescador" are "numbers" and I need the DLookUp function to return "numbers"

Is there anything regarding the DLookUp that I'm missing? Is there any way to convert the text into numbers by adding something like Format(DLookUp...)
I don't know how the format function works either.
Thank you very much
Where are you storing the return? In a textbox on a form or a variable in code? In other words where is this code?
Mar 18 '07 #2

P: 5
Hi, thank you for your answer. I haven't come back earlier because I solved the problem with FindFirst in VB. Anyway, I'd like to know the answer to my question. The thing is:
The code is in a query and the result appears in the column when I open the query in spreadsheet view. I also use the results to sort out the records on a report.
Mar 21 '07 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
Hi, thank you for your answer. I haven't come back earlier because I solved the problem with FindFirst in VB. Anyway, I'd like to know the answer to my question. The thing is:
The code is in a query and the result appears in the column when I open the query in spreadsheet view. I also use the results to sort out the records on a report.
Try this ...

Expand|Select|Wrap|Line Numbers
  1. CLng(DLookUp("[SumaDePUNTOS]","qryPuntospORPescador","APELLIDO='" & [APELLIDO] & "' AND NOMBREPESCADOR ='" & [NOMBREPESCADOR] & "'"))
Mar 21 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.