I need to perform a query which to copies the SomeField field between Project Details and Project Details Copy for the project which is equal to the GetID() - just returns an integer - however, there are multiple versions of each project and I need to return the SomeField field for the latest (highest numerically) version.
The query looks like this:
DoCmd.RunSQL "INSERT INTO [Project Details Copy] (SomeField) SELECT [Project Details].[SomeField] FROM [PRS Project Details] WHERE (([Project Details].[Project ID])= GetID()) AND ([Project Details].[Version] = Maximum);", -1
I know that ([Project Details].[Version] = Maximum) is not the correct syntax...so what should I use instead?
Thanks
[This message has been edited by northy (edited 09-25-2001).]
The query looks like this:
DoCmd.RunSQL "INSERT INTO [Project Details Copy] (SomeField) SELECT [Project Details].[SomeField] FROM [PRS Project Details] WHERE (([Project Details].[Project ID])= GetID()) AND ([Project Details].[Version] = Maximum);", -1
I know that ([Project Details].[Version] = Maximum) is not the correct syntax...so what should I use instead?
Thanks
[This message has been edited by northy (edited 09-25-2001).]