Re: Varible in query
- From: John Vinson <jvinson@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 27 Sep 2005 14:21:56 -0600
On Tue, 27 Sep 2005 20:08:45 +0100, "Alec Green"
<excouncil@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>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]
.
- Prev by Date: Re: Summary totals in query
- Next by Date: Re: How do I save an access query to a floppy?
- Previous by thread: format result of an update query
- Next by thread: Re: Add 3 months for next quarterly statement
- Index(es):