Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connection string from outlook to access db

Status
Not open for further replies.

D2C

Programmer
Aug 27, 2001
86
BE
Hi there,

I am using a form that pops up after the user clicks on the email. I want to record the recipients name to a table and count +1 for every email he/she sends to this recipient.

My form is working with a yes or no, that's no problem.
But how do I make the connection string in VB for outlook and how can I record the recipient properly?

This is what I have so far:

Code:
Sub countmacro()

Dim conn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rs As New ADODB.Recordset
Dim sConnString  As String

sConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\BVRdb.mdb;User Id=admin;Password=;"

conn.Open sConnString
Set cmd.ActiveConnection = conn

cmd.CommandText = "SELECT * FROM overzicht"
cmd.CommandType = adCmdText
Set rs = cmd.Execute

Do While Not rs.EOF
 
 
rs.MoveNext
Loop

Set rs = Nothing
Set cmd = Nothing
conn.Close
Set conn = Nothing

End Sub

thank you very much for all your help,

greetz,
d2c
 

Connect Strings

Skip,

[glasses] [red]Be advised:[/red]To be safe on the FOURTH, don't take a FIFTH on the THIRD, or...
You might not come FORTH on the FIFTH! [bomb][tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top