Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling an Access Sub Procedure from VB6

Status
Not open for further replies.

LearningSql

Programmer
Apr 16, 2002
48
0
0
US
(This was originally posted in the VB6 forum however I was told that I may get a better answer here. Thanks all in advance!)

Hello All --

I'm not a full fledged VB6 programmer but I can make my way around most things. I'm more of a know-enough to get around many programming platforms type of person....so please bear with me on this one....

Is it possible to have a fully working SubProcedure in MSAccess97 run by a VB6 application? The Sub runs 2 update queries then exports 8 select queries into 1 Excel workbook.

Here are particulars...
- MSAccess 97 db has a PW on it
- The SubProcedure works perfectly every single time when run from within MSAccess97 but I can't seem to find any code that will call the SubProcedure from VB6
- Is it better to use ADO or DAO when coding this solution?

What I'm really beating myself on is:
- How do I open up the DB passing the PW on automatically?
- How do I run the SubProcedure from the VB6 app?

It's been at least 2 days so I've been diligent about searching but probably have used wrong terms to search for the correct solution. I appreciate any direction you can give.

I'm operating on Windows XP Pro, Access97, VB6 sp5(?).

Thanks again.
PJ
 
Have you tried OLE Automation with the Access.Application object ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi PH --

No I have not. Let me look into that piece and see what I come up with. Geez....another method.... it's all good.

It can be quite maddening at times!

Thanks again.
PJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top