LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Why am I getting a Compile error on my SQL statement?

Any idea what is wrong with my src statement? It is giving me a
compile error when I attempt to run the code and it highlights the
"Rejected" portion. It runs perfectly fine as a query in the database
and I can't see any quotes or anything out of place...

Thanks.

Src = "SELECT Orders.Order, Orders.Date, Orders.Time,
Rejections.Order, Rejections.Date, " & _
"Rejections.Time, " &
"IIf(Orders.Order=Rejections.Order,"Rejected","Fil led") " & "AS
Fill_Status " & _
"FROM Rejections RIGHT JOIN Orders ON
Rejections.Order=Orders.Order " & _
"WHERE Orders.Date Now() - 42 " & _
"ORDER BY Orders.Order, Rejections.Order;"
 
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
Micrsoft Visual Basic Compile error: Expected: end of statement IJ Excel Discussion (Misc queries) 5 October 23rd 06 12:08 AM
VBAProject name compile error, not defined at compile time Matthew Dodds Excel Programming 1 December 13th 05 07:17 PM
error message: compile error, argument not optional Pierre via OfficeKB.com Excel Programming 3 September 5th 05 03:45 PM
How do I get rid of "Compile error in hidden module" error message David Excel Discussion (Misc queries) 4 January 21st 05 11:39 PM


All times are GMT +1. The time now is 01:26 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"