Results 1 to 3 of 3
  1. #1
    snewman is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    Feb 2014
    Posts
    1

    combo box based on current record


    I am making a form for customer company information. I want to be able to put the contact as a combo box with a separate contact form to show all contacts for a particular company. The each time we add an entry for this company we can select a contact for that particular job. But my combo box shows all contacts, not just contacts I have linked to that company. I have seen post for selecting the content of the combo based on another combo on the form, but I am trying to base it on the primary key of the current record. Does anyone have any ideas?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    You can use any criteria you want. If the primary key is saved as foreign key in the contacts table, then yes, use it as criteria.

    If you navigate the form between companies, will need code that requeries the combobox. The real trick is figuring out what event to use. In this case, possibly the form OnCurrent event.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849
    Do you have a data model for your database that supports your business rules?
    My idea is to have a data model, test data scenarios, and to make sure the model supports the scenarios before getting too deeply involved in Access specifics.

    Good luck with your project and welcome to the forum.

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

Similar Threads

  1. Replies: 9
    Last Post: 09-17-2013, 11:08 PM
  2. Replies: 2
    Last Post: 04-02-2013, 02:24 AM
  3. Set Current Record based on Primary Key Input
    By andersonEE in forum Forms
    Replies: 2
    Last Post: 06-24-2011, 08:23 AM
  4. Replies: 2
    Last Post: 05-11-2011, 02:58 PM
  5. Query based on current record in form
    By bhsvendbo in forum Queries
    Replies: 1
    Last Post: 06-01-2010, 11:20 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