View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
fi.or.jp.de fi.or.jp.de is offline
external usenet poster
 
Posts: 93
Default Mail Merge source Access Database using Excel VBA... Pls Anyone

Thanks joel,
I will try as said below, if any problem comes i will get back to you
soon.



On Oct 25, 3:30*pm, joel wrote:
Are you asking a question? *I saw this posting yesterday and thought you
were just showing results of your macro!

The title of you request said you wanted to order by date so here is an
example of a SQL to retrieve a record set in order

SELECT Submissions.Task_ID, Submissions.`Client Name`,
Submissions.`Effective Date`, Submissions.`Imp Mgr`, Submissions.`Due
Date`, Submissions.`Actual Date`, Submissions.`Date Difference`
FROM `C:\temp\submission`.Submissions Submissions
ORDER BY Submissions.`Due Date`

What I recommend to help you get the syntax correct is to perfrom a
database query manually. *The Query wizard allows you to manually set up
a SQL.

Go to worksheet menu

Data - Import External Data - Import Data - New Database query. *

Selct the database. *Then in first menu select the column(s) you need.
The
2nd menu allows you to add any filtering. *The 3rd menu allows you to
select the Sort field(s). *Then in the 4th menu select Edit Query radio
button and press Finish. *The query editor will appear. *Press the SQL
button and copy the SQL. *You can *edit the SQL as required but it will
give you the syntax for the SQL.

--
joel
------------------------------------------------------------------------
joel's Profile:http://www.thecodecage.com/forumz/member.php?userid=229
View this thread:http://www.thecodecage.com/forumz/sh...d.php?t=147644