Connecting Tech Pros Worldwide Help | Site Map

Field names / spaces

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 08:29 AM
Nick J
Guest
 
Posts: n/a
Default Field names / spaces

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



  #2  
Old November 13th, 2005, 08:29 AM
Rick Brandt
Guest
 
Posts: n/a
Default 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


  #3  
Old November 13th, 2005, 08:29 AM
Bob Quintal
Guest
 
Posts: n/a
Default 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.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.