LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default SQL Syntax


wrote in message
...
On Nov 7, 1:39 pm, Michael wrote:
Assuming the sheet you want is the first sheet in your workbook,
myvar=myvar = Sheets(1).Name

Then substitute your variable:

" " & "WHERE Projects.Project_Number="& myvar & ";"

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.



- Show quoted text -


I get the error that characters are found at the end of the SQL
statement


Drop the semicolon at the end.

Tim




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
A bit of Syntax help please... ste mac Excel Programming 4 January 4th 07 08:35 PM
Need syntax help! FCC[_6_] Excel Programming 6 June 30th 06 10:30 AM
VBA syntax Sunantoro Excel Discussion (Misc queries) 1 September 21st 05 03:19 AM
Syntax James Bronsan Excel Programming 1 August 12th 04 09:09 PM
syntax for a sub ( ) ibrahim Excel Programming 0 July 22nd 03 03:11 PM


All times are GMT +1. The time now is 02:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"