Hi,
Just wondering is there an Auto_Close() procedure in Access97. If I want to run the below function everytime the users close/exit Access, where should I place it??
Code:
Function CutLinkTable()
Dim myDb As Database
Set myDb = CurrentDb
On Error GoTo Err_Check1
myDb.TableDefs.Delete "mainTable"
'
'
'
Exit Function
Err_Check1:
If Err.Number = 3265 Then
MsgBox Err.Description & ". " & "Please ensure that you have linked the required table/s." _
, vbOKOnly, "Error Message"
Exit Function
Else
MsgBox "Error Nos: " & Err.Number & ". " & Err.Description & ". " _
& "Please contact your system administrator.", vbOKOnly, "Error Message"
Exit Function
End If
End Function
Thanks and regards
LSTAN
Just wondering is there an Auto_Close() procedure in Access97. If I want to run the below function everytime the users close/exit Access, where should I place it??
Code:
Function CutLinkTable()
Dim myDb As Database
Set myDb = CurrentDb
On Error GoTo Err_Check1
myDb.TableDefs.Delete "mainTable"
'
'
'
Exit Function
Err_Check1:
If Err.Number = 3265 Then
MsgBox Err.Description & ". " & "Please ensure that you have linked the required table/s." _
, vbOKOnly, "Error Message"
Exit Function
Else
MsgBox "Error Nos: " & Err.Number & ". " & Err.Description & ". " _
& "Please contact your system administrator.", vbOKOnly, "Error Message"
Exit Function
End If
End Function
Thanks and regards
LSTAN