Results 1 to 7 of 7
  1. #1
    mlm is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    9

    Record associated field record after inputting entry in form

    Hi,
    I'm an Access newbie, so sorry if this is pretty simple. I'm trying to create a database to record events and associated information. So far, I have two main tables, with the listed fields:

    (1) Principals
    (a) ID (PK)
    (b) First Name
    (c) Last Name
    (d) Title


    (e) Department

    (2) Events
    (a) ID (PK)
    (b) Principal
    (c) Date
    (d) EventType

    The events table is the only one that should be edited on a regular basis, so I'm trying to create a form for people to enter new events. I'd like to program it (at least I think this is the right thing to do) so that the user chooses the first and last name of the principal (so those options come from the pre-set Principals table) along with the Date and EventType, but then have the Principals ID recorded in the Events table. So far, I have guessed that it might involve a query, but like I said, this is my first database, so I'm a little lost.

    Thanks!
    mlm

  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,521
    Try the combo box wizard. It should walk you through exactly that. I'm assuming your form is based on the events table.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    mlm is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    9
    Thank you so much! That worked like a charm. I'm definitely still learning the basics.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problem, and welcome to the site!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    mlm is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    9
    Thanks!
    I did run into another issue...after I added the combo box, my Principals table became "not updateable." It won't have to be updated often, but it should be open for editing in case I need to add a person to the list. Did I do something wrong?

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I'm not sure what could have done that. The combo should not do that, even with the form open. It's not updateable all the time, or just when the form is open, or ? Can you post the db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    mlm is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    9
    I think I may have solved it...one of my relatonships didn't have referential integrity applied.

    Perhaps you can help me understand this though. I have another table ("Departments") to store all options for the Principals' "Department" field. When I was trying to learn more about relationships, before I added the combo box, I changed the PK of the Departments table to the Department field (each row is unique) and then linked that to the "Department" field in the Principals table. It wouldn't let me apply referential integrity though. It said the two fields had to have the same number of records or the same data type. Is it a data type compatability issue? When I undid all of this and made the PK the ID, I could apply referential integrity and the Principals table opened up.

    Thanks for all your help, I know I have a lot to learn!

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

Similar Threads

  1. Replies: 9
    Last Post: 02-28-2012, 01:45 PM
  2. Replies: 1
    Last Post: 09-28-2011, 01:17 PM
  3. Lookup List in a Form for Table Record entry...
    By noaccessguru in forum Forms
    Replies: 1
    Last Post: 05-05-2011, 12:35 AM
  4. blank on entry on add a record form
    By gmee in forum Forms
    Replies: 1
    Last Post: 10-07-2009, 07:31 AM
  5. Replies: 4
    Last Post: 03-24-2009, 09:07 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