Hey guys,
I'm trying to make this new process require the least amount of manual intervention by having the user open 2 of the 10 databases used. The user would open databases 1 & 5, and the databases would open the next in succession (2-4, 6-10) in a new instance of Access. Problem is, when I try this out, using two test dbs, db1 locks up until db2 finishes its process, the db1 completes its own. I need all 10 processes to run in unison, 5 on each pc, but I cant figure out where to go from here. I'll post the code I've written, maybe one of you prodigies can figure this out
I'm trying to make this new process require the least amount of manual intervention by having the user open 2 of the 10 databases used. The user would open databases 1 & 5, and the databases would open the next in succession (2-4, 6-10) in a new instance of Access. Problem is, when I try this out, using two test dbs, db1 locks up until db2 finishes its process, the db1 completes its own. I need all 10 processes to run in unison, 5 on each pc, but I cant figure out where to go from here. I'll post the code I've written, maybe one of you prodigies can figure this out
Code:
Function UpdateDB() As Boolean
On Error GoTo fun_err:
Dim appAccess As New Access.Application
Dim str_Path As String, str_function As String
str_Path = "C:\Option\Desktop\ScrapeTemplate2.mdb"
str_function = "MainProcess"
UpdateDB = False
With appAccess
.OpenCurrentDatabase str_Path 'Open Database
.Visible = True 'Hide or Show Database
.Run str_function 'Run Function '----This is where the process freezes----'
End With
Set appAccess = Nothing
UpdateDB = True
fun_exit:
Exit Function
fun_err:
UpdateDB = False
Debug.Print Err.Number & ":" & Err.Description
Resume fun_exit:
End Function