Varible in query

  • Thread starter Thread starter Alec Green
  • Start date Start date
A

Alec Green

If I have a table with varibles in ie TAX, DISCOUNT1, DISCOUNT2 etc, can I
call these in an unrelated query?
say

SellingPrice*[TAX]/100 ?

Thanks

Alec
 
If I have a table with varibles in ie TAX, DISCOUNT1, DISCOUNT2 etc, can I
call these in an unrelated query?
say

SellingPrice*[TAX]/100 ?

Thanks

Alec

Only by joining this table into the Query, or by using DLookUp. If the
table containing this information has multiple records, how would you
determine which record to use?

For the DLookUp solution, you could use

SellingPrice * DLookUp("[Tax]", "[TableName]", <criteria>) / 100

where the criteria specify which record to look up (omit the criteria
if the first or only record in the table is acceptable).

If the table has only one record, simply include it in your Query with
no join line.

John W. Vinson[MVP]
 
Back
Top