Query on last sheetID number

R

Rick Patterson

Access 2002
I have a table called JobSheet and one called JobDetails. The JobSheet
references several JobDetail records. (In other words JobSheetID 31 may
reference 10 JobDetailIDs) I am building a querry in design viewthat will
deliver summary information on all of the data in JobSheetID 31. I can make
this work by using a parameter query but I would like to have the querry
just look at the last entered JobSheetID rather than ask me which JobSheetID
I want to look at.
Is there a way to do this in the criteria field?
I hope I made sense with my request.
 
G

Gerald Stanley

If the JobSheetIds are issued in ascending order, you could
put the following in the JobSheetId criteria field

= (SELECT Max(JobSheetId) FROM JobSheet)

Hope This Helps
Gerald Stanley MCSD
 
R

Rick Patterson

Thanks That Worked Great!!!!
Gerald Stanley said:
If the JobSheetIds are issued in ascending order, you could
put the following in the JobSheetId criteria field

= (SELECT Max(JobSheetId) FROM JobSheet)

Hope This Helps
Gerald Stanley MCSD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top