Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ms Access Execute Function
#1
Hello
I would like to connect an open MS Access File to execute a Function.

Someting like this in VB(A) Script:

Dim oApp As Access.Application

Set oApp = GetObject("C:\Folder\File.accdb")
Debug.Print oApp.Run("QM_Test", 123)


I tried this:


typelib MsAcc "C:\Programme\Microsoft Office\Office12\MSACC.OLB"

MsAcc.Application oApp
oApp = GetObject("C:\Folder\File.accdb") (Error: expected 3 to 3 arguments, not 1.)
VARIANT* f = &oApp.Run("QM_Test", 123) (Error: expected VARIANT* tip: use operator & to get address of variable, or operator + to cast type.)


Help is welcome. Thanks


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)