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: 15
Default SQL syntax in VBA for Access

Hi,

I'm trying to return data from access into excel. I've tried using MS
Query, but I find it clunky and difficult to use. I'm trying to use vba to
connect to the db and return the data I want that way. All I have to is get
my SQL string to be properly formatted to work via the VBA, which is where
I'm hitting the hurdles. I know the syntax is not exactly the same, but I'm
not getting the proper format.


How would the following cross-tab query need to change?

TRANSFORM First([100_L1_Index].[100L1DlyIndx]) AS 100L1DlyIndx
SELECT [100_L1_Index].Date
FROM 100_L1_Index INNER JOIN G_L1 ON [100_L1_Index].Sect = G_L1.L1G
GROUP BY [100_L1_Index].Date
ORDER BY G_L1!L1G & " - " & G_L1!L1GName
PIVOT G_L1!L1G & " - " & G_L1!L1GName;

Thank you very much.
Kohai
 
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
syntax error in VBA in query from Access Winget Excel Discussion (Misc queries) 0 January 21st 10 07:49 PM
Syntax to address ThisWorkbook.BuiltinDocumentProperties via Access Automation? [email protected] Excel Discussion (Misc queries) 0 June 24th 08 01:29 AM
Microsoft][ODBC SQL Server Driver]Syntax error or access violation Jordan Excel Discussion (Misc queries) 0 July 6th 05 06:58 PM
Access data -work in Excel- save in Access s_u_resh Excel Programming 1 October 25th 04 12:52 PM
Getting Access Error Messages when running Access through Excel Dkline[_2_] Excel Programming 0 October 12th 04 09:35 PM


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