Question Confusing question! ...

OrionTC

Registered User.
Local time
Today, 23:40
Joined
Nov 16, 2010
Messages
12
Hard to describe what i want but ill explain.

I created a stock database with a field called "tape range" so inside this we would have for example Tape1 - Tape 10 which has a total of 10 tapes.

When someone uses 5 tapes this range now becomes Tape 6 - Tape 10. because 1-5 have just been used. This is then traced by an audit table etc.

My only problem is when i create a report of the Audit trail on this record it will take the "tape range" of the latest entry so Tape 6 - Tape 10 in this case but originally it was Tape 1 - Tape 10.

So my report would state Tape 6 - Tape 10 and then list the audit trail. And i want it to state the first entry made for that record which would be Tape 1 - Tape 10....

Hope i made myself clear...
 
We don't know your table structure.

Does the entry, Tape 1 - Tape 10, exist?
 
Does this help?

The entry Tape 1 - Tape 10 only exists once until its changed to Tape 6 - Tape 10 for example. thgere is a record of Tape 1 - tape 10 in "before value" from the audit table but that could populated with other before values too from other fields i.e. Total. Maybe its a limitation of my table structure. i couldnt write an audit module myself so had to make do with what i could get to work....



Uploaded with ImageShack.us
 
How does it get updated? Perhaps you can use that code.

I think, in your table you should have had three fields: MinValue, MaxValue, UsedValue.

So when it comes to displaying the tape string it will be calculated like:
Code:
"Tape " & [MaxValue] - [UsedValue] + [MinValue] & " to " & [MaxValue]
 
----->
 
"Tape " & 10 - 5 + 1 & " to " & 10
 
-->
 
Tape 6 to 10
Just a quick thought, haven't really given it much thought but gives you an idea.

Let's see a few records from the Audit table and tblAsset. Screenshots will do.

By the way, tblAsset and tblAssetLongTerm can be merged into one table.
 

Users who are viewing this thread

Back
Top Bottom