Results 1 to 3 of 3
  1. #1
    kman42 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    40

    Getting display value of lookup column?

    How do you programmatically get the display value of a lookup column?

    I have a lookup column that works fine, but when I try to get the value through vba, I can only get the bound value (a number). I tried doing it the way I would for a combo box: [field].Column(1), but that didn't work. I need the display value so I can use it in a Dlookup function on another table.

    Thanks,
    kman

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    When you say "lookup column" do you mean that you have a lookup at the table level? If so you may want to take a look at this site to see why it is not a good idea to have lookups at the table level. Lookups (combo and list boxes) are best left for forms. If the lookup is based on a table, then the best way is to use a query based on the table to get the value you need. Are you trying to do this in code from a form?

  3. #3
    kman42 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    40
    Very enlightening. Thanks. I'll rejigger so that the lookup occurs on the form. I was using a datasheet subform, so putting the lookup in the table made it easy. At least until I ran into the limitations you pointed me to.

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

Similar Threads

  1. Need help with Lookup Column
    By Buakaw in forum Access
    Replies: 5
    Last Post: 02-26-2012, 03:04 PM
  2. Adding a lookup to a column
    By revnice in forum Access
    Replies: 4
    Last Post: 08-16-2010, 12:58 PM
  3. Use of Lookup Column Versus Listbox
    By P5C768 in forum Access
    Replies: 2
    Last Post: 02-25-2010, 02:00 AM
  4. Recursive Lookup and display?
    By madyson in forum Access
    Replies: 3
    Last Post: 12-15-2009, 09:01 AM
  5. Lookup values in one column from another record
    By cjayjones in forum Queries
    Replies: 16
    Last Post: 08-05-2009, 02:27 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