A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to Open MS Access File



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 9th 06, 09:41 PM posted to microsoft.public.outlook.program_vba
DevDaniel
external usenet poster
 
Posts: 2
Default How to Open MS Access File

Using VBA, how do I open a Microsoft Access file from within Outlook.
Ads
  #2  
Old August 10th 06, 06:51 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default How to Open MS Access File

Am Wed, 9 Aug 2006 12:41:53 -0700 schrieb DevDaniel:

Sample with ADO:

Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset

Set cn = New ADODB.Connection
With cn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "D:\database.mdb"
.CursorLocation = adUseClient
.Mode = adModeShareDenyNone
.Open
End With

Set rs = New ADODB.Recordset
With rs
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockOptimistic
Set .ActiveConnection = cn
.Open ("select * from [Tabellenname]")
End With

' close record and connection
rs.Close
cn.Close


--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Using VBA, how do I open a Microsoft Access file from within Outlook.

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OUTLOOK 2002 - No Option to Open an Outlook data file under the file open menu. [email protected] Outlook - General Queries 2 August 6th 06 03:49 AM
How do I open personal folders in outlook web access? JEANDEJL Outlook - Calandaring 9 June 23rd 06 07:29 PM
The process cannot access the file because it is being used by another Jacobo Outlook - General Queries 2 March 7th 06 07:52 PM
Can't Access OE File Folder When Importing into Outlook cnysteve Outlook - Installation 2 January 14th 06 08:26 PM
Open Access DB from Outlook Richard Outlook and VBA 2 January 10th 06 09:46 AM


All times are GMT +1. The time now is 09:29 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright 2004-2025 Outlook Banter.
The comments are property of their posters.