rcflyboyjr
Programmer
(Using Access 2007, DBs are access 2003 .mdb format (eventually will convert to accdb but stuck in .db for now )
I use DB1 to open a DB2 . using the following code
-----------------
On Error GoTo err_RunAccessSub
Dim appAccess As Access.Application
Dim appReturn As Variant
' Create instance of Access Application object.
Set appAccess = CreateObject("Access.Application")
appAccess.Visible = True
appAccess.AutomationSecurity = msoAutomationSecurityLow
appAccess.OpenCurrentDatabase strFilePath, True
appAccess.Eval (strSub)
RunAccessSub = True
exit_RunAccessSub:
appAccess.Quit
Exit Function
err_RunAccessSub:
RunAccessSub = False
GoTo exit_RunAccessSub
---------------------------
DB1 is the Controlling database DB2 is used to perform specific tasks based on processes. (DB2 can be any of several databases we use for specific tasks)
Durring execution of functions in DB2 i need to update a status window in an open form in the calling DB1.
I have a function in DB2 that can grab the hWnd id of DB1 but not sure what to do with it from there. I have been looking into ADDROF to run a function in the parent application thinking i can pass a value and update that way but not sure how.
Not familiar enough with API calls or cross database automation. I have figured out how to automate the DB2 when opened but not how to go the other direction.
Any help would be great
I use DB1 to open a DB2 . using the following code
-----------------
On Error GoTo err_RunAccessSub
Dim appAccess As Access.Application
Dim appReturn As Variant
' Create instance of Access Application object.
Set appAccess = CreateObject("Access.Application")
appAccess.Visible = True
appAccess.AutomationSecurity = msoAutomationSecurityLow
appAccess.OpenCurrentDatabase strFilePath, True
appAccess.Eval (strSub)
RunAccessSub = True
exit_RunAccessSub:
appAccess.Quit
Exit Function
err_RunAccessSub:
RunAccessSub = False
GoTo exit_RunAccessSub
---------------------------
DB1 is the Controlling database DB2 is used to perform specific tasks based on processes. (DB2 can be any of several databases we use for specific tasks)
Durring execution of functions in DB2 i need to update a status window in an open form in the calling DB1.
I have a function in DB2 that can grab the hWnd id of DB1 but not sure what to do with it from there. I have been looking into ADDROF to run a function in the parent application thinking i can pass a value and update that way but not sure how.
Not familiar enough with API calls or cross database automation. I have figured out how to automate the DB2 when opened but not how to go the other direction.
Any help would be great