Results 1 to 7 of 7
  1. #1
    robbfamily is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2014
    Location
    Philadelphia, Pa
    Posts
    6

    Multiple Primary Key ID Numbers in Form with Subform ???

    I have a document management db with forms/subforms. I want a list of unique documents with sub forms showing what language that document has been translated into and it's corresponding attached document.



    I've apparently made a change that has caused the "tblDocuments" form (default form on open) to show more than one copy of a record. It's showing multiple copies of each document including the same Primary Key ID & corresponding Document Name in the form.

    Can anyone tell me how to get back to only one copy of my documents (Primary key) in the Documents form?


    Any other suggestions on how to improve the efficiency of this database is also welcome.

    Thanks

    David

    ps. The file, zipped is 4.1 MB the dropbox public link to this file is: https://www.dropbox.com/s/7vfasel8g2...nagement_1.zip

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    I can't download file right now, maybe tomorrow.

    Did you change the RecordSource of the form to include another table?
    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
    robbfamily is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2014
    Location
    Philadelphia, Pa
    Posts
    6
    June7, Not that I know of. I added some yes/no check boxes to the form for query purposes, but no other tables. That's what's got me confused. I'm not sure what I did to cause the duplication. There are a lot of relationships with this db. I'm sure it's there somewhere.

    thanks for any help, much appreciated.

    David

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    The reason for 'duplicate' document ID is inclusion of tblAttachments in the form RecordSource. There are multiple attachment records for each document ID. The attachments table should be in a subform.

    If each document can be only one type (Personal, Financial, Pre, etc) then instead of multiple checkboxes should be a single field with a combobox. If each document can be multiple types, possibly should be a junction table with a record for each type/documentID combination. Multiple checkboxes for what is essentially the same data element will be problematic in searching and filtering records.

    Are you aware that Access has a 2GB file size limit? Embedded attachments can use up that limit fast.
    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.

  5. #5
    robbfamily is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2014
    Location
    Philadelphia, Pa
    Posts
    6
    Thanks, June7 for the advice. I thought the attachments were already in a subform (tab) along with all of the other subforms in the Documents form. What am I missing?

    So, I should get my I've embedded the attachments because I'm not confident that the source file will remain 'in-place' on the network. I don't currently have exclusive control over those folders. Though, the limitation may force a 'link' rather than embedding. Is that the only other option?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    frmDocument has a RecordSource that is an SQL statement which includes tblDocument and tblAttachment. Remove tblAttachment from that RecordSource.

    There are subforms on the tab control and one of them is bound to tblAttachment. I did not look for it before, I went as far as looking at frmDocument RecordSource.

    Alternative to embedded attachments is saving document filename (with or without complete folder path) in a text field. Review http://allenbrowne.com/func-GoHyperlink.html
    Last edited by June7; 04-28-2014 at 02:58 PM.
    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.

  7. #7
    robbfamily is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2014
    Location
    Philadelphia, Pa
    Posts
    6
    Thank you, Thank you. perfect solution, June7. I appreciate it greatly!

    David

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

Similar Threads

  1. Replies: 8
    Last Post: 03-10-2014, 11:47 AM
  2. Multiple Listboxes on form with subform
    By cbrsix in forum Programming
    Replies: 12
    Last Post: 08-01-2013, 03:35 PM
  3. Multiple Primary Keys
    By JonathanOz in forum Access
    Replies: 2
    Last Post: 03-22-2013, 08:32 AM
  4. Multiple account numbers
    By BenM912 in forum Forms
    Replies: 1
    Last Post: 03-21-2011, 10:47 AM
  5. Multiple primary keys
    By elektrisk in forum Access
    Replies: 5
    Last Post: 02-11-2010, 04:39 PM

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