Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2010
    Posts
    20

    How do you refer to primary key on split form?

    I'm using a split form in Access 2007. The bottom part of the form shows the table that is linked to the form. When the user clicks on one line in the table, I want to update that specific line. in order to do that I need to grab the primary key for that line to use in my code. What's the syntax for referring to the key specific to that line?

    Many thanks.....it's giving me a headache

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    The split form, introduced in Access2007, provides 2 simultaneous views of the same record set (table or query). I'm not sure you mean by 'refer to primary key'. In the split form one doesn't need to refer to it.

    Perhaps you a refering to a subform - where the data in the subform is a differing record set then the main form. In which case one needs a cross referencing value in both record sets. In this case - when you insert the subform into the main form - the wizard will ask you the cross referencing fields - and when you add data to the subform it will automatically insert the value from the main form.

  3. #3
    Join Date
    May 2010
    Posts
    339
    Take a look here

  4. #4
    Join Date
    Jul 2010
    Posts
    20

    little more detail

    I have a form that shows the entry boxes on the top, and then the split form shows the same fields in the underlying table at the bottom. so when the user enters data in the upper form, it is saved in the table showing at the bottom.

    however, I need the user to be able to select a line in the table at the bottom and then be able to modify the data. usually they are going to add an attachment. I need to get the primary ID of the line that they clicked so I can then connect the attachment specifically to that line

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

Similar Threads

  1. Replies: 1
    Last Post: 08-03-2010, 01:33 PM
  2. Send Primary Key from a Form To A Report
    By nkuebelbeck in forum Forms
    Replies: 1
    Last Post: 03-18-2010, 12:24 PM
  3. Replies: 4
    Last Post: 03-12-2010, 05:42 PM
  4. Replies: 0
    Last Post: 10-29-2009, 08:55 PM
  5. Refer to main form
    By terryvanduzee in forum Forms
    Replies: 3
    Last Post: 10-23-2009, 07:02 AM

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