Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do How do I set a minimum amount of entries for a set of records i

Status
Not open for further replies.

DocControlChik

Technical User
Nov 1, 2002
4
US
How do I set a minimum amount of entries for a set of records in Access 2000?
I have a database to keep track of Lab tests.
I have separate tables for each test, and these items are linked to a Lot Number (not the primary key, I use that as criteria to run an average QRY). Each entry has its own PK, I have to average a minimum of six test entries per lot number, but there can be more then six test per lot number.
I want to make sure the user enters at least six records. The number of records minimum changes per test type, so I am hoping if I learn how to do this for this test I can apply what I learned to other tests. I am looking for ANY ideas.
I have even tried making a table with all six entries then a field to average, but the expression builder tells me I have too much information to make the average with in the same table. This was not ideal but I tried.

Thank you in advanced,

DocControlChik
If I need to give more information before anyone can help me please email me smauermeyer@euromdinc.com
 
Hello,
I am still looking for any advise on the above problem.
I gave up on the averaging the six record in one table. That just is not working at all.

Please reply to tell me that I am dreaming if setting a number of records is not possible.

I would love to know if I can set a parameter on a report that tells the user there is not enough data to complete the report, that would be very helpful. I just have no idea where to even begin to look this up, even suggestions to the type of expression to look up would be helpful!

Thank you in advanced,

DocControlChik
 
Doc,

Not sure I totally understand how your tables are set up... If you have a table for each test, why can't you create at least 6 required result fields?

For example, for the gestational diabetes table:

TestName Text
Result1 Number
Result2 Number
Result3 Number
.....

If you set the first 6 result fields to "yes" in the required section, your user would have to enter data into those fields. Any additional result fields (result7-???) would be additional.

You could then create a query averaging result1-6 that would automatically update as the fields once the 6th result was entered.

Hope this helps!

Angela
 
Dear Angela,
Below are the structures for both tables, I am at a loss.

TblRelease

Field name type default value /info/required
ID AutoNumber Y
Release Number 1/Enter the release test results/Y
Unit Text N/Pick the unit (Lookup)/Y
LotNumber Text /Pick the lot Number (Lookup)/Y
Date Date/time ()date//n

This setup works great if I do not care how many results for the Lot number Field, Lot number is entered from the production department. If I knew how to enter the criteria to set the number of records in the query to get the averages, my table would be sufficient.

Field name type default value /info/required
ID Auto Number //Y
Release1 Number 1/Enter the release test results/Y
Release2 Number 1/Enter the release test results/Y
Release3 Number 1/Enter the release test results/Y
Release4 Number 1/Enter the release test results/Y
Release5 Number 1/Enter the release test results/Y
Release6 Number 1/Enter the release test results/Y
Unit Text N/Pick the unit (Lookup)/Y
LotNumber Text /Pick the lot Number (Lookup)/Y
Date Date/time ()date/

Average Number this is a calculated field that I am having trouble calculating, I keep getting error messages the string is too long, and or invalid syntax ect. I have tried to get the average a few ways.

I am not sure if I am even asking the right questions. I greatly appreciate your help with this.
Samantha
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top