Automation Server

  • Thread starter Thread starter Ray Hogan
  • Start date Start date
R

Ray Hogan

Hi,
I wish to run modUpdate which includes an Append Query, Delete and Make
Table, but the following hangs on DoCmd.
I would appreciate any help.

Function UpdateRG()

Dim objAccess As Access.Application
Dim strDBPath As String

Const DB_path As String = "c:\plantreg\updaterg.mdb"

Set objAccess = New Access.Application
With objAccess
..OpenCurrentDatabase DB_path
..DoCmd.OpenFunction "modUpdate", acViewNormal, acAdd

End With
objAccess.Quit
Set objAccess = Nothing

Thanking you in anticipation.
Regards.
Rayh.
 
Have you checked Access Help on the OpenFunction Method?

It looks to me that this OpenFunction Method only works in
ADP to open a SQL Server Database UDF.

Since your database is an MDB, I don't think OpenFunction
will work.

My guess is the Call statement with the Sub name or the
Function name, NOT the Module name which you seemed to use
by normal naming convention.

Check Access Help on the Call statement.

HTH
Van T. Dinh
MVP (Access)
 
Back
Top