racemadnss
Registered User.
- Local time
- Today, 05:19
- Joined
- May 18, 2004
- Messages
- 58
Im trying to query my database for the Biggest number in a column then put that number into a Variable.
I have no idea how to do this, I tried this:
But all I get is the .RunSQL highlighted saying
Expected Funtion or Variable
What am I doing wrong?
I have no idea how to do this, I tried this:
Code:
PrevJobNum = DoCmd.RunSQL("SELECT Max([Jobs].[JobID]) AS MaxOfJobID, [Jobs].[BusinessID] FROM Jobs GROUP BY [Jobs].[BusinessID] HAVING (((Jobs.BusinessID)=[BusinessID]));")
But all I get is the .RunSQL highlighted saying
Expected Funtion or Variable
What am I doing wrong?