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]
 

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

Format Numbers in IIF statement 2
Array formula 2
d lookup 2
VBA Varible in SQL Query 14
query relelated to 2 combo boxes 2
tax calculation in a form 2
Query Control 10
dlookup 3

Back
Top