# Thread: Access Circle Error (97)

1. ## 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. ## 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?

3. ## 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. ## 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.

5. ## 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
•