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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Control in one database from second spawned database

Status
Not open for further replies.

rcflyboyjr

Programmer
Jan 16, 2012
3
US
(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
 

hi,

Please post MS Access questions in one of the many MS Access forums like forum705.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top