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

Open Access DB from Outlook



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 9th 06, 05:07 PM posted to microsoft.public.outlook.program_vba
Richard
external usenet poster
 
Posts: 114
Default Open Access DB from Outlook

Please help. I need to open an Access 2000 database (which is on a network
server) from inside Outlook 2000, using a macro assigned to a toolbar button.

If it can be done.

Thank you for your help.
--
Richard
Ads
  #2  
Old January 10th 06, 12:32 AM posted to microsoft.public.outlook.program_vba
Rob Nicholson
external usenet poster
 
Posts: 3
Default Open Access DB from Outlook

Please help. I need to open an Access 2000 database (which is on a
network
server) from inside Outlook 2000, using a macro assigned to a toolbar
button.

If it can be done.


Yes, you have to learn how to use ADO to open a connection to the database
and then open a table or execute a query within the table. This the returns
a recordset which you can walk through processing each row as required.

Cheers, Rob.


  #3  
Old January 10th 06, 09:46 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default Open Access DB from Outlook

Am Mon, 9 Jan 2006 08:07:04 -0800 schrieb Richard:

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:\db.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 [Field list] from [Tabellenname]")
End With

Finished:
rs.Close
cn.Close


--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook



Please help. I need to open an Access 2000 database (which is on a

network
server) from inside Outlook 2000, using a macro assigned to a toolbar

button.

If it can be done.

Thank you for your help.

 




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
unable to open default e-mail folders; info store won't open No Avail Outlook - Installation 3 July 30th 07 01:48 AM
can't open this item unable to open the free/busy information Patamit Outlook - Calandaring 0 March 8th 06 05:31 PM
link to outlook from Access Philip Leduc Outlook - General Queries 0 February 27th 06 10:34 PM
How do I set up outlook express so that messages do open unless I open them. Nev. Outlook Express 2 February 26th 06 12:49 AM
Outlook Web Access DirPubSafety Outlook - Using Forms 1 February 17th 06 07:51 PM


All times are GMT +1. The time now is 04:54 PM.


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.