Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 127
Default Querying an Access Database from Excel VBA

Excel 2003, Access 2003. I want to access a query within an Access database.
The database is called "FEOpen.mdb" and the Query is called "Projects List."
I guess I may be asking how to populate a recordset from Excel VBA using the
Access query. Any help will be appreciated. God bless and thanks.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Querying an Access Database from Excel VBA

Hi,
Are you trying to display the result of a query in a sheet?
If so, excel has a built-in feature that does just that and does not require
code:
1- in a new blank sheet
2- menu Data Get (or Import) External Data New Database Query. The
'Choose Data Source' dialog pops up.
3- make sure the checkbox 'Use the Query Wizard...' (at the bottom) is
checked. Choose MS Access Database and click ok. The 'Select Database' dialog
pops up.
4- browse to you db file and select it. click ok. The Query Wizard pops up.
5- The Query Wizard displays a list of tables and queries. Select one and
follow the wizard steps.

The wizard is good to build simple queries. Now, if yours is too complex
then in step 3 above, uncheck the 'Use the Query Qizard...'. In that case MS
Query opens (instead of the query wizard) and you should have much more
flexilbility there.

i hope this helps,
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Chaplain Doug" wrote:

Excel 2003, Access 2003. I want to access a query within an Access database.
The database is called "FEOpen.mdb" and the Query is called "Projects List."
I guess I may be asking how to populate a recordset from Excel VBA using the
Access query. Any help will be appreciated. God bless and thanks.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 127
Default Querying an Access Database from Excel VBA

Dear Sabastien:

Actually I want to populate a record set and do some manipulations and
calculations on the data. Hence, the built-in "external data" capability of
Excel will not suffice. Can you suggest some code that would use the query
and place the results in a record set that I could then process through?
Thanks for any help. God bless.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org


"sebastienm" wrote:

Hi,
Are you trying to display the result of a query in a sheet?
If so, excel has a built-in feature that does just that and does not require
code:
1- in a new blank sheet
2- menu Data Get (or Import) External Data New Database Query. The
'Choose Data Source' dialog pops up.
3- make sure the checkbox 'Use the Query Wizard...' (at the bottom) is
checked. Choose MS Access Database and click ok. The 'Select Database' dialog
pops up.
4- browse to you db file and select it. click ok. The Query Wizard pops up.
5- The Query Wizard displays a list of tables and queries. Select one and
follow the wizard steps.

The wizard is good to build simple queries. Now, if yours is too complex
then in step 3 above, uncheck the 'Use the Query Qizard...'. In that case MS
Query opens (instead of the query wizard) and you should have much more
flexilbility there.

i hope this helps,
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Chaplain Doug" wrote:

Excel 2003, Access 2003. I want to access a query within an Access database.
The database is called "FEOpen.mdb" and the Query is called "Projects List."
I guess I may be asking how to populate a recordset from Excel VBA using the
Access query. Any help will be appreciated. God bless and thanks.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default Querying an Access Database from Excel VBA

Chaplain Doug wrote:
Dear Sabastien:

Actually I want to populate a record set and do some manipulations and
calculations on the data. Hence, the built-in "external data"
capability of Excel will not suffice. Can you suggest some code that
would use the query and place the results in a record set that I
could then process through? Thanks for any help. God bless.


Try here

http://www.dicks-blog.com/archives/2...ordset-basics/


--
Dick Kusleika
MVP - Excel
Daily Dose of Excel
http://www.dicks-blog.com


Reply
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
Database access & querying Steve[_78_] Excel Programming 7 September 12th 05 02:21 PM
Querying Data from Secured Access Database with VBA VBA Dabbler[_2_] Excel Programming 9 February 18th 05 09:15 PM
Querying Access Database Edgar Thoemmes Excel Worksheet Functions 1 December 15th 04 01:58 PM
Querying Access through Excel Chris Dunigan Excel Programming 2 April 29th 04 10:26 AM
Querying a database for values in each row Stephen Goldfinger Excel Programming 13 December 19th 03 01:25 PM


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