Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / September 2005

Tip: Looking for answers? Try searching our database.

Varible in query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alec Green - 27 Sep 2005 20:08 GMT
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
John Vinson - 27 Sep 2005 21:21 GMT
>If I have a table with varibles in ie TAX, DISCOUNT1, DISCOUNT2 etc, can I
>call these in an unrelated query?
[quoted text clipped - 5 lines]
>
>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]    
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.