J
John Keith
I could do this in VBA easily, however I want to know the pure-access query
syntax for accomplishing this (to allow the range table to be maintained by
the end-user) I have looked at http://allenbrowne.com\ser-58.html as a
start, but I'm having trouble converting this to my needs.
I need to lookup the meals per manhour using the Average Daily Participation
MMHFactorOLD w/ two fields
MinimumADP, MperMH
0, 11
151, 12
251, 13
501, 14
901, 15
Input Query "Staffing Input" has Period, Site and ADP
Top of new query references the InputQuery all fields (*)
Im adding a new field to pull the looked up MperMH
?? Do I need to "Show Table" and add the tblMMH?
Or create the field with MperMH:Select DISTINCT MPerMH From tblMMH
And In the Criteria of the new MMH field...
(SELECT Min(MinimumADP) FROM tblMMH WHERE MinimumADP > ADP)
I've tried several different versions and it crashes access.
The end result I'm trying for is:
Period Site ADP MMH
2009/10 100 103 11
2009/10 200 275 13
2009/10 300 501 14
2009/10 400 900 14
2009/10 500 999 15
syntax for accomplishing this (to allow the range table to be maintained by
the end-user) I have looked at http://allenbrowne.com\ser-58.html as a
start, but I'm having trouble converting this to my needs.
I need to lookup the meals per manhour using the Average Daily Participation
MMHFactorOLD w/ two fields
MinimumADP, MperMH
0, 11
151, 12
251, 13
501, 14
901, 15
Input Query "Staffing Input" has Period, Site and ADP
Top of new query references the InputQuery all fields (*)
Im adding a new field to pull the looked up MperMH
?? Do I need to "Show Table" and add the tblMMH?
Or create the field with MperMH:Select DISTINCT MPerMH From tblMMH
And In the Criteria of the new MMH field...
(SELECT Min(MinimumADP) FROM tblMMH WHERE MinimumADP > ADP)
I've tried several different versions and it crashes access.
The end result I'm trying for is:
Period Site ADP MMH
2009/10 100 103 11
2009/10 200 275 13
2009/10 300 501 14
2009/10 400 900 14
2009/10 500 999 15