Results 1 to 2 of 2
  1. #1
    darekg11 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Sep 2012
    Posts
    7

    Substracting value of record in table based on data in form

    Hi, I have a problem.
    I have a continous form with fields:
    ID_product, Name, Ammount, Price



    Now when I click my button: "Save" I would like to make ammount of ID_product to be calculated and removed from table: "Products".

    For example:
    I have a table Products with 3 records:
    1 Bla bla 5 2.20 Euro
    2 SOmething 3 4.44 Euro
    3 Umbrella 4 1.22 EUro

    Now I have entered on form:
    1(ID) name is aumatically added to form 1 price is automatically added

    So it should remove 1 product Bla bla from table Products.

    So i tried to declare global dynamic array of size of products(3); it worked.
    Then I wanted to enter ammount of each entered product into each element of array.
    But everytime when I have tried to reffere to this global array frmo functions access throw out Null error.

    Please advise me how to use global variables or how could I make it work easier way?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    Need to provide code or database for analysis. Follow instructions at bottom of my post.

    I don't see how using array helps modify records. Why would you delete product records?

    Have you looked at the Northwind sales template database? http://office.microsoft.com/en-us/te...001228997.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.

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

Similar Threads

  1. Replies: 3
    Last Post: 08-09-2012, 01:49 PM
  2. Replies: 6
    Last Post: 05-10-2012, 08:20 PM
  3. Replies: 1
    Last Post: 04-24-2012, 02:36 PM
  4. Closing a Form Based on Table Data
    By perihelia in forum Programming
    Replies: 2
    Last Post: 03-05-2012, 05:33 PM
  5. Replies: 2
    Last Post: 02-04-2012, 01:48 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