Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    cappuccino is offline Novice
    Windows Vista Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    10
    thanks but i am slightly confused



    where do i change recordsource and stuff
    and what is a compiund primary key, i heard of primary key

    thanks again!

  2. #17
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    My suggestions concern basic Access functionality. How did you create the forms and not know what RecordSource property is?

    Change the RecordSource property of the subform. Open the subform in design view, find the RecordSource property on the property dialog.

    A compound primary key is when two or more fields are used to define a unique identifier. In the case of tbl_loan, this will prevent a duplication of barcode and person pair. Will have to deselect BarcodeID field as primary key then select both BarcodeID and PersonID fields simultaneously and assign as primary key. I tried leaving just BarcodeID as solo primary key but the form would not work. Or don't have any field designated as primary key in tbl_loan and just set the BarcodeID field as Indexed Yes(No duplicates). But this setting or solo PK designation means can't have records that show the book was loaned to more than one person, meaning can't have history. Record would have to be deleted from tbl_loan when the book is returned before could be checked out to someone else.

    Did you look at the Lending Library template?
    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. #18
    cappuccino is offline Novice
    Windows Vista Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    10
    do you mean foreign key?

    and where can i find the lending library template?

    thanks

  4. #19
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    BarcodeID and PersonID fields in tbl_loan are foreign keys but the BarcodeID field was also set as a primary key. When I stated 'primary key' that is what I meant.

    I also just noticed that the PersonID field is set as Index Yes(No duplicates), this needs to be Index Yes(Duplicates OK).

    tbl_loan really doesn't need any primary key unless you want the compound key so as to prevent duplicate BarcodeID and PersonID pairs.

    Open Access to create a new project. There is a Library Catalog template under Personal. Turns out that is not the same db as Lending Library which is available at http://office.microsoft.com/en-us/te...010206883.aspx
    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.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 04-18-2012, 07:38 AM
  2. how to make autocomplete field from history
    By tushargsm in forum Forms
    Replies: 1
    Last Post: 01-18-2012, 09:51 AM
  3. Populate Form And Make Editable
    By Rick5150 in forum Forms
    Replies: 1
    Last Post: 10-04-2011, 09:04 AM
  4. Updatable & editable subform?
    By jfn15 in forum Forms
    Replies: 2
    Last Post: 06-21-2011, 10:35 AM
  5. Replies: 4
    Last Post: 04-09-2010, 02:16 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