Results 1 to 5 of 5
  1. #1
    CRinne is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    3

    Use of field Alias in calculated field of same query

    I have a query that sums up sales numbers in one column from and another column which is forecasted sales numbers. I would like to use the field alias in another field to simply find the difference between the two. I tried using the alias names, but of course Access didn't understand it, so is it possible??? If so, what is the syntax to use for the calculation????

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    You have to run the calc in the first column before the second calc can be done. Aggregate is not possible running a single query. A quick and easy way may be to create a second query object that runs the first calc/alias and then join the first query object in a second query using the query builder.

  3. #3
    CRinne is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    3
    Quote Originally Posted by ItsMe View Post
    You have to run the calc in the first column before the second calc can be done. Aggregate is not possible running a single query. A quick and easy way may be to create a second query object that runs the first calc/alias and then join the first query object in a second query using the query builder.
    That explains the problem very well. Great suggestion, I will try that approach. Thanks for the quick feedback!!!

  4. #4
    CRinne is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2013
    Posts
    3
    I tried your suggestion and worked like a charm. Thanks again for the help!

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    It may not be the most eloquent solution but it is something that you managed on your own.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Calculated Field in Crosstab Query
    By bryan0 in forum Queries
    Replies: 2
    Last Post: 01-23-2014, 03:54 PM
  2. Replies: 3
    Last Post: 02-13-2013, 10:15 AM
  3. Populate Calculated field in query
    By Mpike926 in forum Access
    Replies: 25
    Last Post: 09-07-2012, 11:04 AM
  4. Parameter Query on a calculated field
    By l3111 in forum Queries
    Replies: 5
    Last Post: 10-12-2011, 02:18 PM
  5. Update Query with a Calculated field
    By Lorlai in forum Queries
    Replies: 3
    Last Post: 09-21-2011, 10:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums