Query to Lookup Specific Criteria Based on Date

Tophan

Registered User.
Local time
Today, 01:23
Joined
Mar 27, 2011
Messages
389
Hi yet again :D Every time I think that I have covered all bases with this database I can think of another report that would be useful!

I have a drawing register database which notes the revisions for all drawings issued. One drawing can be revised several times so I have a details table which notes the revision letter, date issued and the notes for each revision. Using this table I created a max date query to show the latest issue date and revision for each drawing. This query is used for a transmittal form for issuing drawings. Both the form and report is working perfectly.

The TBLTransmittal consists of the following fields
ContractName
IssueDate
SubSup
DwgNo (multi-value checkbox)

Using the TBLDwgRegisterDtls or the query QRYDtldDwgReg (which includes the drawing titles) I would like to create a query that would look up the latest revision at the date of issue and show the revision letter.

I started a query combining TBLTransmittal and TBLDwgRegisterDtls and in the criteria for DateIssued of the TBLSDwgRegisterDtls (which is when the drawing was issued by the architect to the contractor) I put "Not > [IssueDate]". This is filtering the information to show revisions issued up to the date we (the contractor) issued the drawing to our sub-contractor but I need now to pull the max revision only from this information.

Hope this explanation isn’t too confusing. Any suggestions on how to achieve this would be greatly appreciated.

Before I go I will give you an example of what I want from the end result

Drawing BK2-02 rev. D was issued by the architect to the contractor on July 17th. This drawing was in-turn issued to our sub-contractor (Sub ‘A’) this Saturday, August 9th. The same drawing was revised this morning and rev. E was issued to Sub ‘A’ today, August 11th.

I want the end report to show that Sub A received Rev. D on 09-08-14 and Rev. E on 11-08-14.

I'm wondering if another max date query on this new query would work? I'll try and see what happens.
 
Tophan

I'm curious. Do you have a data model for your database, and does the database meet your requirements?
If you have test data and a working model, can't you test your new ideas against your working data model?

Good luck.
 
I have tried so many different things today that I think I got confused. It is a working database so I made a copy of it and was trying different theories but nothing worked. Only as I was typing the previous post I thought about the MaxofDate idea but haven't gotten a chance to try it.

Thanks for your input
 

Users who are viewing this thread

Back
Top Bottom