Sorry, my sample above didn't really explain what I was attempting. I currently have the user side check for a file, and if the file does not exist Access closes the form that connects them to db1 so I can Compact/Repair. However, I was hoping there was a way to just check a form box in db1 and receive the same result.
Function lck()
'form in db1
If Forms!Locked.LockBox.Value = True Then
'in db2
docmd.openform "CollectorCompactRepair"
Else
Function lck()
Set AccessApp = GetObject(DBPath, "Access.Application")
msgbox accessapp.forms("formname").controlname
'form in db1
If accessapp.Forms!Locked.LockBox = True Then
'in db2
docmd.openform "CollectorCompactRepair"
Else
End Function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.