PDA

View Full Version : Solved: Query via ODBC



cactus
04-22-2009, 01:58 PM
Hi,

I need to import a query via a ODBC connection in a VBA script in access, but I really don't realise how to do it.
I have the DSN, and an SQL sentence.

Someone can help me?

Thanks in advance and sorry for my english.

Cactus.-

CreganTur
04-23-2009, 05:49 AM
When you use the Linked Tables (File-> Linked Tables) you can select ODBC as an option. You'll need to have setup an ODBC connection to your database before doing this.

The wizard makes stepping thorugh the process very easy. Just use the ODBC option to create a link to your table in Access. Then you can build a query in Access to pull the desired records out of the linked table.

HTH:thumb

cactus
04-23-2009, 04:42 PM
Thanks Randy,

I've linked the tables and i'm working with them.