vba code for minimum

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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.
 
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.
 
Will all the Item #6 records belong to the same ContID?
This is actually sounding like what you really need is a subform.
 
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.
 
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.
 
Back
Top