On Sun, 10 Jul 2005 20:43:51 GMT, New Guy <Ne****@yahoo.com> wrote:
On Sun, 10 Jul 2005 20:31:32 GMT, New Guy <Ne****@yahoo.com> wrote:
I'd still like an exact answer to my original question, if you would
please.
Here's the code I have so far:
Dim objAccess As Access.Application
Set objAccess = New Access.Application
'MsgBox objAccess.Reports.Count
objAccess.OpenCurrentDatabase "C:\Current Database\new.mdb"
objAccess.Visible = True
objAccess.DoCmd.OpenQuery ("Create_Invoice_Footer")
objAccess.Run ("Create_Invoice_Footer")
Are both the OpenQuery and Run lines needed?
Thanks again.
I did find out that I don't need the "objAccess.Run
("Create_Invoice_Footer")" line.
Hi
You put me in an embarrassing position.
Your original post said
"All I want to do is run an existing ACCESS 2000 query from VB with no
information returned to VB"
That implied that you are programming a VB program and want to run an
stored action query (ie insert (append), update or delete) in a JET
(ie Access) database. The way to do this is as PietLinden suggests,
though you could use DAO instead of ADO.
But the example code you since posted suggests you are going to follow
this up with other things in a full Access environment, eg create
reports.In this case automation is certainly indicated.
I suggest you go to
http://support.microsoft.com/default...NoWebContent=1
"Microsoft Office 2000 automation Help file is available in the
Download Center."
the download gives many examples of automating Access 2000.
Can't you do it all in one instance of Access and avoid automation? My
own experiences are it is nothing but trouble, eg it leaves dangling
references and the called aplication doesn't close but sits there
invisibly; any failures are hard to recover from; etc etc. Access 2000
also has many bugs in this area and maybe not all were cured by
service packs. I would prefer to use the shell method if I had to.
David