Hello,
My current application opens and runs a procedure in a separate Access
database. It looks like this.
Public Sub ProcessAll()
Dim appAccess As New Access.Applicat ion
appAccess.OpenC urrentDatabase ("G:\RebateRepo rt.mdb")
appAccess.Run "ProcessAll "
appAccess.Close CurrentDatabase
End Sub
The problem is "RebateReport.m db" must be closed or it will not
process. I need code that would close it if it were open and then
re-open and run it.
I need to add something like:
appAccess.Path= "G:\RebateRepor t.mdb"
If appAccess.IsOpe n Then
appAccess.FileC lose
EndIf
Of course this is improper syntax. How would I do this?
My current application opens and runs a procedure in a separate Access
database. It looks like this.
Public Sub ProcessAll()
Dim appAccess As New Access.Applicat ion
appAccess.OpenC urrentDatabase ("G:\RebateRepo rt.mdb")
appAccess.Run "ProcessAll "
appAccess.Close CurrentDatabase
End Sub
The problem is "RebateReport.m db" must be closed or it will not
process. I need code that would close it if it were open and then
re-open and run it.
I need to add something like:
appAccess.Path= "G:\RebateRepor t.mdb"
If appAccess.IsOpe n Then
appAccess.FileC lose
EndIf
Of course this is improper syntax. How would I do this?
Comment