Cannot execute s select Query

shery1995

Member
Local time
Today, 02:15
Joined
May 29, 2010
Messages
71
Hi all!

Can someone view the following qury and advse where I'm wrong cuz when I execute query I'm getting the above message.


Private Sub Form_BeforeInsert(Cancel As Integer)
Set DB = CurrentDb
DB.Execute "SELECT max(tblClientMatter.MatterID) + 1 FROM [tblClientMatter] WHERE " _
& " [tblClientMatter].[MatterID]=" & Me![MatterID]
Set DB = Nothing
End Sub




Thanks
 
CurrentDB.Execute is *only* for ACTION queries.
 

Users who are viewing this thread

Back
Top Bottom