Results 1 to 2 of 2
  1. #1
    ducthang88 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2010
    Posts
    12

    access help in forms!

    here is the scenario:



    Ive created 2 tables which are
    Books (accessno,title,author,copies)
    Borrowedbooks.. (title,author)


    Im the form of Books, ive created a button in which the title and author fields will insert into the borrowedbooks' title and author fields and will Decrease its copies by 1.

    what i want now is when i will delete the data in the Borrowedbooks, i want to increase the copies in the books form by 1 wherein it will add the data similar to the title or author in the data of the Borrowedbooks


    For example:

    books form

    accessno: 1,2,3
    title: one,two,three
    author: uno,dos,tres
    copies: 1,2,3

    i chose the 1st data so the Borrowed books will look like
    title: one
    author: uno


    while the books

    accessno: 1,2,3
    title: one,two,three
    author: uno,dos,tres
    copies: 0,2,3
    (note one uno book -1 copy)

    now i want is when i want to delete the title: one,author:uno field in the Borrowedbooks, the title: one author:uno field in the Books table have +1 copy.

    accessno: 1,2,3
    title: one,two,three
    author: uno,dos,tres
    copies: 1,2,3

  2. #2
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,172
    Hi,

    maybe it's easier when you review your database structure:
    you need more tables, for example

    tblAuthors
    -----------
    autID (autonumber, primary key (=PK))
    autName
    ....

    tblBooks
    -------------
    bookID (autonumber, PK)
    bookTitle
    bookISBN

    tblBooksAuthors
    ---------------
    bkaID (autonumber, PK)
    bkaBook (Long Integer FK to tblBooks.bookID)
    bkaAuthor( Long Integer, FK to tblAuthors.autID)
    ...

    tblCopies
    -----------
    copyID (autonumber, PK)
    copyBook (Long Integer, FK to tblBooks.bookID)
    copyPrice (Currency)
    .......

    tblPersons
    ----------
    perID (autonumber, PK)
    perName
    .......

    tblBorrowedBooks
    -----------------
    bbkID (autonumber, PK)
    bbkBook (Long Integer, FK to tblBooks.bookID)
    bbkBorrowedBy (Long Integer, FK to tblPersons)
    bbkBorrowedOn (date)
    bbkReturned (Yes/No)
    bbkReturnedOn (date)
    .......

    greetings
    NG

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

Similar Threads

  1. Microsoft Access Forms
    By hajvery in forum Queries
    Replies: 1
    Last Post: 01-06-2010, 11:29 AM
  2. Calculation in access forms
    By miziri in forum Programming
    Replies: 13
    Last Post: 11-23-2009, 05:55 AM
  3. Need Help with forms on MS Access
    By orion in forum Forms
    Replies: 4
    Last Post: 06-23-2009, 08:08 PM
  4. Help with Access & Forms
    By gnatgnats in forum Forms
    Replies: 2
    Last Post: 02-18-2008, 10:33 AM
  5. Replies: 0
    Last Post: 01-19-2007, 07:58 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