vba code for minimum

H

Hendricks97

I have a table that contains measurements with a varying number of criteria
grouped by ContID and by ItemID. I have a form linked to the table and I
would like the user to open it based on ContID and the lowest ItemID in the
table. How can I get this to work?
 
K

Klatuu

Set the Order By property of the form to ContID, ItemID

Then when the user selects a ContID, the first ItemID will be the current
record.
 
H

Hendricks97

The only problem with that is that the number of criteria for each item
changes, but it is more than one most of the time, so I need it to pull all
of "Item #6"'s records for example, so I need it to be part of the link
criteria when I open the form.
 
K

Klatuu

Will all the Item #6 records belong to the same ContID?
This is actually sounding like what you really need is a subform.
 
H

Hendricks97

Thats what I was thinking, but I was trying to avoid, Ive had people complain
about subs being confusing. Yes, within each Container, there will be x
number of items all belonging to that container.
 
K

Klatuu

I think they will have to complain. This really cries for a sub form. Now,
it may reduce their whining if you use a single record form as the subform.
 
Top