Populating a textbox by looking at the test input.

Sniper-BoOyA-

Registered User.
Local time
Today, 03:40
Joined
Jun 15, 2010
Messages
204
Good Morning everyone,

Ive got a question regarding populating a textbox by looking at the test input (value).

Ive made a table which is going to be used by our people in the lab, by entering test data. This can be done by using a form.

To keep it short (i try anyways), the field that is important is WetDensity.

This field will be populated by the people in the lab with the density of the wet sample. (10 samples)

What id like to do is, add a textbox to the form, and populate it by looking at the value of WetDensity.

The highest should get "P1"
Second highest should get "P2"
Lowest should get "P10"

I know you can use MIN and MAX for the lowest and the highest value. But what about the second highest or the second lowest?

Any ideas?
 
Update:

Ive decided to split the form into 2. 1 will be used to enter the pre-test data, and 1 will be used to enter the actual test data.

The query which is the source of the second form, will be :

Code:
SELECT queryveldgegevens.tbllabgegevens.proefnummer AS Proefnummer, queryveldgegevens.prctrnr, queryveldgegevens.natdchthd, queryveldgegevens.mpdepd, queryveldgegevens.optimumepwatergeh, queryveldgegevens.opmnucleair, IIf([watergeh]="","",([natdchthd]/([watergeh]+100)*100)) AS drgdchthdinsitu, (([massaschlmonnat]-[massa3])/([massa3]-[massaschl]))*100 AS watergeh, IIf([drgdchthdinsitu]="","",([drgdchthdinsitu]/[mpdepd])*100) AS gecorrverdgrd, Round([gecorrverdgrd],0) AS roundgecorrverdgrdr, Round([drgdchthdinsitu],0) AS rounddrgdchthdinsitu, Round([watergeh],1) AS roundwatergeh
FROM queryveldgegevens
ORDER BY queryveldgegevens.natdchthd DESC;

So that the highest value will always be on top. (Natdchthd = Wet Density)

All i need now is to auto assign the "P1","P2"..."P9","P10"

Is there some sort of loop i can use?

Variable = P0
Variable= Variable + 1 ?
 

Users who are viewing this thread

Back
Top Bottom