Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2011
    Posts
    2

    Unanswered: Link to a form from an unbound List Box in a Tab

    Hi,

    I'm new here and I would ask for help. I just started using Access 2007 and am in way over my head!

    I have an unbound list box in a tab that displays contact information. I would like the user to be able to click on the record they choose and have a form pop up with the linked to the specific information from the contacts table. So far, I can only get the form to pop up with all the data from the master form, not the specific record from the unbound list box. Here is what I have so far:

    stLinkCriteria = "[Vendor ID]=" & Me![Vendor ID]
    DoCmd.OpenForm "frmVendorContactsView", , , stLinkCriteria

    I have tried to change the link criteria to the contact ID, [ID] but Access tells me it can not find ID in the Master table. It displays all the records for the master table, but I need the pop up form to display the specific record that is clicked.

    Any help is greatly appreciated.

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    DoCmd.OpenForm "frmVendorContactsView", , , "ID = " me.ListBoxName

    This should work.

    Access tells me it can not find ID in the Master table.
    Fix this and I think you'll be done.

    The underlying query for the popup form needs the PKF in it for this code to work.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Aug 2011
    Posts
    2

    Talking Thank you

    It worked! Many Thanks!!

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    You're welcome :-)
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •