Syntax

fernin8r

Registered User.
Local time
Today, 23:11
Joined
May 28, 2002
Messages
142
What is the proper syntax for the following:

rst!Employee = "'"& Me!Author.DefaultValue &"'"

This gives me unwated quotation marks or apostrophes.

I think it has somthing to do with it being a DefaultValue. Thanks.
 
Try

rst!Employee = '" & Me!Author.DefaultValue & "'"

i.e. single quote, double quote &

and
& double quote, single quote, double quote

I'm assuming your using this in an SQL statement in VBA with further text prior to the rst!Employee
 
i tried that too, but i get a window saying
Compiled error:
Expected: expression
 
yeah...

the whole text is:

With rst

.AddNew
!Employee = "'"& Me.Author.DefaultValue &"'"
.Update

End With
 
In the case your showing it should work without the quotes and ampersands at all.

Try

!Employee = Me.Author.defaultvalue

else try setting a string prior to this equal to the default value and then set !Employee equal to this string.
 
Please make sure there is a blank space to the left and tight of &
 
Jacob,
could you please explain a little better what you are talking about?


antomack...i've tried both of those before...i don't know why the quotations keep showing up.
 

Users who are viewing this thread

Back
Top Bottom