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
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