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: 1
Default Quick help - SQL statement in Excel Macro...


Code
-------------------
Option Explicit
Sub test()
Dim inttest
inttest = 0
Workbooks("efmimuster").Worksheets("Tabelle1").Cel ls(10, 1) = inttest


End Sub

-------------------


Hi, this is how far I got in Excel :o

Now I would like to implement the following SQL statement:

SELECT Count(tblmain.main_id) AS Anzahlvonmain_id
FROM tblsbu INNER JOIN ((tblarea INNER JOIN tblcinco ON tblarea.area_i
= tblcinco.area_id) INNER JOIN tblmain ON tblcinco.cinco_id
tblmain.cinco_id) ON tblsbu.sbu_id = tblcinco.sbu_id
GROUP BY tblsbu.sbu, tblarea.area, tblmain.status
HAVING (((tblsbu.sbu)="Electronic Technologies") AN
((tblarea.area)="A-1") AND ((tblmain.status)="EF"));

I think that I basically need to open an Access session, open th
database, run somewhere the sql statement, close it all again. Fo
that I believe to have to also implement some kind of Access library i
excel.

Never done this before though, maybe I don't have to open an Acces
session? I read somewhere I can access tables without opening th
database...

Don't know, could someone pls just show me a standard routine to d
this. Thanks a lot

--
Message posted from http://www.ExcelForum.com

 
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
Quick Macro help KJ Excel Discussion (Misc queries) 1 February 28th 08 04:58 PM
Need Quick Macro Help! bxc2739 Excel Discussion (Misc queries) 2 April 24th 06 08:32 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Another Quick Simple VBA question (if...then statement) abxy[_35_] Excel Programming 6 February 27th 04 09:48 AM
Quick VBA code question (if...then statement) abxy[_31_] Excel Programming 4 February 26th 04 01:04 AM


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