Results 1 to 2 of 2
  1. #1
    drudini11 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2012
    Posts
    1

    Question selecting from table in form creating new entries as opposed to using existing

    I have setup a simple access database consisting of 3 tables
    Volunteer
    Id (PK)
    Name



    Job
    Id (PK)
    JobName

    Link
    Id (PK)
    VolunteerId (FK)
    JobId (FK)


    There is a one to many relationship between Volunteer and Link and a many to one between Link and Job

    I want to create a form from which I’ll select a Volunteer Name and then choose a JobName from a list box of options and have it create an entry in link with the id of the volunteer selected and the id of the job selected

    So let’s say there are 5 entries currently in the Job Table………..let’s call the JobNames A,B,C,D and E.

    In my form I select my name from the list (sourced from volunteer.Name) and then select B from the dropdown. My desired result would be a single entry gets created in Link with VolunteerId = 1 (representing me) and JobId = 2 representing the selection of B. Problem that I am having is that after I select B in the dropdown it creates a new record for B in Job and the Link table gets updated with that JobId as opposed to simply using the one that was already in the table. Have tried multiple ways of getting this to work and feel the table structure is OK so not quite sure what I am missing………hopefully someone can point me in the right direction. I am familiar with table relationships but more from the standpoint of querying data as opposed to forms and inserting records so this one has me stumped (and I’ll probably kick myself if the solution is simple and I’m just missing the boat).

    Any help would be appreciated.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Suspect issue with form RecordSource and controls are bound to wrong fields.

    Want to provide db for analysis? Follow instructions at bottom of my post.
    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.

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

Similar Threads

  1. Replies: 11
    Last Post: 07-24-2012, 07:50 PM
  2. Replies: 11
    Last Post: 05-23-2012, 08:42 AM
  3. Replies: 2
    Last Post: 06-13-2011, 09:43 AM
  4. creating unique ID on existing table
    By TheShabz in forum Access
    Replies: 6
    Last Post: 01-24-2011, 03:53 PM
  5. Entries in table not showing on form!!!
    By corystemp in forum Access
    Replies: 6
    Last Post: 03-26-2009, 06:30 PM

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
  •  
Other Forums: Microsoft Office Forums