Hi,
I have created an access system which allows me to input, test and report test samples and cannot for the life of me figure out how to code a part which is crucial.
I enter the samples on my main test entry form. There is a sub form on the page which I enter the samples onto which usually contains between 1 and 6 samples. The main form is the group table and the sub form is the sample table so I have for example a group ID of 108 and say 3 samples within this group with their own sample ID's. Each sample has a test age assigned to it for example:
GROUP ID: 108 - Below samples are in group 108
SAMPLE ID 100 - Test Age = 7 days (When tested I enter the strength against the sample)
SAMPLE ID 101 - Test Age = 14 days (When tested I enter the strength against the sample)
SAMPLE ID 102 - Test Age = 28 days (When tested I enter the strength against the sample)
I would like to be able to tell the sample at 28 days to look at the sample from 14 days or whatever test age is next down and see the strength so I can do some math to work our growth since the last test. I can enter sample test dates from 1 to 100 so would always need it to look at the previous test and test age...?
They are in a group so I figure I could say check SampleID x in GroupID where TestAge = < current SampleID or along them lines? Am I totally off key here? Would a loop be required? I'm kinda lost at this point...
If I need to provide ANY details for someone to help me no problem.
I can get the max by using DMax: DMax("SampleTestAge","TblSample","[GroupID]=" & [GroupID]) but not sure how to tell it to look at the result prior so I can work out the growth rate.
Any help would be very much appreciated![]()