Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Nov 2001
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access Circle Error (97)

    I have this calculation : inventory quantity - sold quantity = inventory balance. Each time this calc is done, I wont to replace sold quantity with inventory balance for the next interation. Inventort quantity is a table value, sold quantity is a form input value. How do I do this without generating an error?

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Access Circle Error (97)

    I don't follow this!
    Are Inventory quantity and inventory balance different names for the same thing?
    Why do you wan to replace sold quantity with inventory balance, when sold quantity is a form input value?
    Regards
    John



  3. #3
    New Lounger
    Join Date
    Nov 2001
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Circle Error (97)

    Forget about the field names and where they are. In general form A1-B1=C1 now replace A! with C! ie C!=A1, next interation then is C1-B2=C2. Continue iteration until C(n) is 0. This causes an error since bacically it is A-B=C=A.

  4. #4
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Access Circle Error (97)

    Why would you do this in a form? You should be storing your data in tables and using relational database design to do this.

    For example, one table is your Inventory Master listing your inventory items. You could then use other tables linked to the Master table as a one to many to track your inventory quantity and another for sold quantity. Then simply execute queries that link the tables to show, by Inventory master Item, the amount of the inventory available less the amount quantity sold.

    Trying to do what you want in a form is possible, but I find it would give me a headache. <img src=/S/groan.gif border=0 alt=groan width=16 height=15>

    If you must do this on a form and I assume you are storing your data in tables, you could use the DLookup commands to get the values you want and then manipulate them.
    Regards,

    Gary
    (It's been a while!)

  5. #5
    New Lounger
    Join Date
    Oct 2002
    Location
    Chattanooga, Tennessee, USA
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Circle Error (97)

    <P ID="edit" class=small>(Edited by charlotte on 22-Oct-02 20:20. to activate link)</P>This is commonly referred to as a running sum. This is quite easy in a report. Report controls have a Running Sum method. To do this in a query is a little trickier. Here is a good illustration of a technique that uses a subquery and alias.

    http://ourworld.compuserve.com/homepages/a...-cg/AqryTip.htm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •