Error 3075

  • Thread starter Thread starter Frankie via AccessMonster.com
  • Start date Start date
F

Frankie via AccessMonster.com

I am having error 3075 ( wrong syntax with Me!CodeClient) message with the
following code on a form AfterUpdate event :
If Not IsNull(Me!NomClient) Then
CurrentDb.Execute "UPDATE tblSecteurProspects SET " _
& "Statut = 'Client'," _
& "CodeClient = " & Me!CodeClient & " WHERE NumProspect = " _
& Me!NumProspect, dbFailOnError
End If
I don't get it.
Anybody 's advice would be greatly appreciated.
Thanks in advance.
Access 2003
 
What data type is CodeClient? If it's text, you need quotes around the value
you're passing:

CurrentDb.Execute "UPDATE tblSecteurProspects SET " _
& "Statut = 'Client'," _
& "CodeClient = " & Chr$(34) & Me!CodeClient & Chr$(34) _
& " WHERE NumProspect = " _
& Me!NumProspect, dbFailOnError
 
Thank you so much! CodeClient is a text field !!
This forum is just great !!
Frankie
 
Back
Top