DLookup in query; percentage format

T

Tom

In Table1, I store an inflation rate value with the following properties:
- data type = number
- fieldsize = double
- format = percent
- decimal places = 2

.... the values for inflation rate (in the table) are shown as e.g. "3.40%"


Now, in a query, I applied the following DLookup:
InflRate: DLookUp("[InflationRate]","[Table1]",[SubAccount]=[SubAccount])

To test the proper working of the expression, I first looked up a text
field... it finds the proper values for the record. Now, I replaced the
text field w/ the field "InflationRate".

Its output is = "0" for all records... I'm sure this is now a formatting
issue. How do I modify the Dlookup expression so that I show the proper
percentage?

Thanks,
Tom
 
T

Tom Lake

Now, in a query, I applied the following DLookup:
InflRate: DLookUp("[InflationRate]","[Table1]",[SubAccount]=[SubAccount])

Try this:

InflRate: DLookUp("[InflationRate]","[Table1]","[SubAccount]=" &
[SubAccount])

Tom Lake
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Dlookup in query - any pointers? 1
Dlookup in query 1
Invalid syntax in dlookup 4
DLookUp 4
DLookUp in a Query 4
DLookUp in a Query 2
dlookup trouble in Access 2007 3
Convert DLOOKUP text to Long Time format 0

Top