G
Gérald M.
Windows 2000 / Office 2000
Hi everyone,
I am opening from VBA Outlook an access database, do a query and close the
database.
If I open that database manually (through double-clicking), it will open but
will not show up on screen :
- The Access Lock File is being created
- An instance of that database can be found in the processus list of
Windows.
Any idea how to solve this?
Here is the code :
Sub test()
' Variables Outlook
Dim olContacts As Outlook.Items
Dim objContact As Outlook.ContactItem
' VariablesDAO
Dim db As DAO.Database
Dim rs As DAO.Recordset
' Autres variables
Dim i As Integer
Dim sSQL As String
' Access
Set db = DBEngine.OpenDatabase("c:\AE\AE-Gestion.mdb")
sSQL = "SELECT AE_Anciens.* INTO Temp FROM AE_Anciens"
db.Execute sSQL
' Goodbye
db.Close
Set db = Nothing
Set rs = Nothing
Set olContacts = Nothing
Set objContact = Nothing
End Sub
Hi everyone,
I am opening from VBA Outlook an access database, do a query and close the
database.
If I open that database manually (through double-clicking), it will open but
will not show up on screen :
- The Access Lock File is being created
- An instance of that database can be found in the processus list of
Windows.
Any idea how to solve this?
Here is the code :
Sub test()
' Variables Outlook
Dim olContacts As Outlook.Items
Dim objContact As Outlook.ContactItem
' VariablesDAO
Dim db As DAO.Database
Dim rs As DAO.Recordset
' Autres variables
Dim i As Integer
Dim sSQL As String
' Access
Set db = DBEngine.OpenDatabase("c:\AE\AE-Gestion.mdb")
sSQL = "SELECT AE_Anciens.* INTO Temp FROM AE_Anciens"
db.Execute sSQL
' Goodbye
db.Close
Set db = Nothing
Set rs = Nothing
Set olContacts = Nothing
Set objContact = Nothing
End Sub