my_brain_hurts
Syncytial
- Local time
- Today, 00:38
- Joined
- Nov 5, 2008
- Messages
- 3
Hi All
I imagine that what I’m going to ask is a very basic stock control question (albeit the stock may be unusual) but please go gently on me guys as I’m very much an Access newbie - this is my first project (and possibly the last).
The background - I work in a lab environment and some of the tools of our trade are radioactive isotopes. I’m setting up a simple database to track usage of vials of different types of isotopes by various members of staff.
So far I have two tables – OUT (to deal with all the isotope withdrawals and user details) and NEW VIALS (into which all fresh vials of isotope stock are entered). There are a number of fields in each but the important ones are:
OUT (input via a form):
-vial number
-quantity withdrawn
-name
-lab number
-date.
NEW VIALS:
-vial number
-isotope
-description
-starting quantity.
I have a query [ALL WITHDRAWALS] containing many of those fields and with the vial numbers related. This query is the basis for my main report that details all usage grouped by vial number.
The problem - I want to set up a second report that presents the details of all withdrawals of a given isotope between defined dates. It will sum the amount of isotope withdrawn and the amount remaining in each vial (both easily done by defining criteria in the query). However, I also want it to calculate the total amount of isotope remaining across all vials of a certain isotope and so far have been unable to fix it. At the moment this query is taking its fields from the [ALL WITHDRAWALS] query.
For example
If I want to query how much of the isotope 32P is withdrawn between dates A and B I run my [ISOTOPE] query which pops up dialogues asking for:
-Isotope?
-Start Date?
-End date?
The result might be:
Two vials, each containing 32P isotope have had withdrawals made in the defined period. They each have two records:
Vial 10 = 100 withdrawn (its starting quantity = 1000)
Vial 10 = 150 withdrawn (same vial so starting quantity =1000)
Vial 20 = 20 withdrawn (starting quantity = 500)
Vial 20 = 60 withdrawn (starting quantity again = 500)
I can do the sums on this in the report:
Vial 10 = 250 withdrawn (amount remaining = 750)
Vial 20 = 80 withdrawn (amount remaining = 420)
However, when I try to calculate the total amount of isotope 32P remaining I get 3000-330=2670 ie all of the starting quantities are added together when really I only want the starting quantity from the first record of each vial.
Hopefully this makes some sort of sense. I’m sure there must be an easy way to do this
but any advice would be greatly appreciated. Thanks.
I imagine that what I’m going to ask is a very basic stock control question (albeit the stock may be unusual) but please go gently on me guys as I’m very much an Access newbie - this is my first project (and possibly the last).

The background - I work in a lab environment and some of the tools of our trade are radioactive isotopes. I’m setting up a simple database to track usage of vials of different types of isotopes by various members of staff.
So far I have two tables – OUT (to deal with all the isotope withdrawals and user details) and NEW VIALS (into which all fresh vials of isotope stock are entered). There are a number of fields in each but the important ones are:
OUT (input via a form):
-vial number
-quantity withdrawn
-name
-lab number
-date.
NEW VIALS:
-vial number
-isotope
-description
-starting quantity.
I have a query [ALL WITHDRAWALS] containing many of those fields and with the vial numbers related. This query is the basis for my main report that details all usage grouped by vial number.
The problem - I want to set up a second report that presents the details of all withdrawals of a given isotope between defined dates. It will sum the amount of isotope withdrawn and the amount remaining in each vial (both easily done by defining criteria in the query). However, I also want it to calculate the total amount of isotope remaining across all vials of a certain isotope and so far have been unable to fix it. At the moment this query is taking its fields from the [ALL WITHDRAWALS] query.
For example
If I want to query how much of the isotope 32P is withdrawn between dates A and B I run my [ISOTOPE] query which pops up dialogues asking for:
-Isotope?
-Start Date?
-End date?
The result might be:
Two vials, each containing 32P isotope have had withdrawals made in the defined period. They each have two records:
Vial 10 = 100 withdrawn (its starting quantity = 1000)
Vial 10 = 150 withdrawn (same vial so starting quantity =1000)
Vial 20 = 20 withdrawn (starting quantity = 500)
Vial 20 = 60 withdrawn (starting quantity again = 500)
I can do the sums on this in the report:
Vial 10 = 250 withdrawn (amount remaining = 750)
Vial 20 = 80 withdrawn (amount remaining = 420)
However, when I try to calculate the total amount of isotope 32P remaining I get 3000-330=2670 ie all of the starting quantities are added together when really I only want the starting quantity from the first record of each vial.
Hopefully this makes some sort of sense. I’m sure there must be an easy way to do this
