DLookup in query; percentage format

  • Thread starter Thread starter Tom
  • Start date Start date
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
 
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
 
Back
Top