Results 1 to 2 of 2
  1. #1
    funkenstein is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    1

    Issues settingup a form to subtract from records

    I am developing a database for a local team's fan club which has three tables- tblMatches, tblEvents and tblBookings, each of which has a corresponding form to add a record to the database. The primary key for tblMatches is 'Match ID' and the primary key for tblEvents is 'Event ID'. Both also have a field called 'Seats remaining', or the number of seats left that can be booked. Seats are booked through the form for tblBookings which has four fields: Event ID, Seatnumberevent, Match ID and Seatnumbermatch and a button called 'Add Booking'. How can the 'Add Booking' button be set up so that when it is clicked, it adds a record to tblBooking and also subtracts 1 from 'Seats remaining' for the corresponding event or match? Thanks.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,963
    Review http://www.dreamincode.net/forums/to...ventory-table/

    As stated in that thread, saving aggregate data is problemmatic. Here is link to a database that demonstrates how to save booking records and track the balance of 'seats remaining' https://www.box.com/shared/c23kknkyyq
    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.

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

Similar Threads

  1. if checkbox= true subtract 8.75 from A to=B
    By VanillaAwesome in forum Queries
    Replies: 6
    Last Post: 07-28-2012, 12:48 PM
  2. Replies: 3
    Last Post: 07-11-2012, 05:13 PM
  3. Subtract from Previous Row
    By lambo102 in forum Queries
    Replies: 1
    Last Post: 08-06-2011, 09:39 AM
  4. How to do subtract in Query
    By NoOoN in forum Queries
    Replies: 6
    Last Post: 04-07-2011, 01:15 PM
  5. Subtract from inventory
    By NISMOJim in forum Access
    Replies: 5
    Last Post: 01-30-2011, 01:09 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