Error 3075

  • Thread starter Frankie via AccessMonster.com
  • 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
 
D

Douglas J. Steele

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
 
F

Frankie via AccessMonster.com

Thank you so much! CodeClient is a text field !!
This forum is just great !!
Frankie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Error 3075 5
Run Time Error 3075 2
Runtime 3075 2
Delete record and Error 3075 2
Syntax error 8
Subform control reference prpblem 6
dlookup runtime error 3075 1
same insert into problem 9

Top