Results 1 to 2 of 2
  1. #1
    amd711 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2012
    Posts
    28

    formula to get a field value corresponding to another field vaue

    I need to add a text box to my report that shows the value of a record in a certain field that is corresponding to a given value in another field.



    for example, if my report shows the following:

    N City

    3 D
    7 F
    2 H
    9 K
    4 A

    the text box should show the name of the city corresponding to the largest number which is in this case "K". is it possible through formula builder?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,530
    As answered elsewhere, try a DLookup() along with Max().
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Calculating a new field using a formula
    By mccambe21 in forum Queries
    Replies: 1
    Last Post: 09-04-2013, 12:16 PM
  2. Formula to assign a number to a field value?
    By dashingirish in forum Queries
    Replies: 2
    Last Post: 02-23-2012, 01:21 PM
  3. Formula field
    By vidplaylist in forum Access
    Replies: 1
    Last Post: 12-07-2011, 04:37 PM
  4. Formula field
    By vidplaylist in forum Queries
    Replies: 3
    Last Post: 12-06-2011, 03:45 PM
  5. Can I have an input variable in a field formula
    By FeatherDust in forum Queries
    Replies: 3
    Last Post: 09-20-2009, 06:40 PM

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