Connecting Tech Pros Worldwide Help | Site Map

Field names / spaces

Nick J
Guest
 
Posts: n/a
#1: Nov 13 '05
Hi,

I have a field called 'Transaction ID' but I can not use it in VBA because I
get the error message 'COMPILE ERROR: expected: end of statement' . I am
sure this is because of the space?

If anyone can tell how how to get around this then that would be great..

many thanks..


Rick Brandt
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Field names / spaces


Nick J wrote:[color=blue]
> Hi,
>
> I have a field called 'Transaction ID' but I can not use it in VBA
> because I get the error message 'COMPILE ERROR: expected: end of
> statement' . I am sure this is because of the space?
>
> If anyone can tell how how to get around this then that would be
> great..
> many thanks..[/color]

Surround all table names and field names with spaces with square brackets [ ].

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


Bob Quintal
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Field names / spaces


"Rick Brandt" <rickbrandt2@hotmail.com> wrote in
news:pvA1e.3495$oy3.2664@newssvr30.news.prodigy.co m:
[color=blue]
> Nick J wrote:[color=green]
>> Hi,
>>
>> I have a field called 'Transaction ID' but I can not use it
>> in VBA because I get the error message 'COMPILE ERROR:
>> expected: end of statement' . I am sure this is because of
>> the space?
>>
>> If anyone can tell how how to get around this then that would
>> be great..
>> many thanks..[/color]
>
> Surround all table names and field names with spaces with
> square brackets [ ].[/color]

An even better IDea is to remove the spaces. If ever you need to
update to SQL server, the square brackets won't work.>

--
Bob Quintal

PA is y I've altered my email address.
Closed Thread