...";Persist Security Info=False;"
conn.Open
'rs1.CursorLocation = adUseServer
'rs1.Supports adUpdateBatch
rs1.Open ("SELECT * FROM tbl_Mail"), conn, adOpenDynamic, adLockOptimistic
'For m = LBound(MyInboxArray) To UBound(MyInboxArray)
For r = 0 To x...
That's a real pain! But I've a feeling that you're right old chap.
I've not had any further success on it either.
Is it possible to download the contents of an enterprise address book to a local contacts folder so I can access it?
Hiya,
I'm saving emails from outlook to an Access DB using VBA. I'm trying to get the sender's email address from emails.
We're on IMAP here and the enterprise address book does not show up in Outlook. I tried using ADO/ADOX to connect to it like a table and it doesn't seem to want to play...
Hi Tran,
thanks for all your assistance man! I've gone with the autosize suggestion, the headers I'm leaving for now. Boy, I gotta learn how to use datagrids man!
Many thanks for all your help on this. A well deserved stars on it's way!
Q
...Source=D:\XL Automation\mailer.mdb" & _
";Persist Security Info=False;"
conn.Open
rs1.Open ("SELECT * FROM tbl_Mail"), conn, adOpenDynamic, adLockOptimistic
For F = 1 To ObjSubFolder.Items.count
Set myMailItem =...
Also, another quick question:
How do I include column headings as well as autosize?
I'm aware of a .CoulumnHeads property, but this is a boolean and I can't see any other way of doing it. When I try to set RowSourceType property from the code I don't know what value to assign to it?
Hi Tranman,
Thanks for your assist, it works perfectly! I've modified to check for nulls.
rs.Open strSQL, con, adOpenDynamic, adLockOptimistic
UserForm6.DisplayBox.ColumnCount = rs.Fields.Count
Do While Not rs.EOF
UserForm6.DisplayBox.AddItem
For intCol = 0 To...
Hiya,
With VBA, I'm trying to retrieve messages from an IMAP folder in Outlook 98 (the sub runs from Excel 2002 though).
I can get the string name of the IMAP Root folder! Like this
Set objOL = New Outlook.Application
Set olNS = objOL.GetNamespace("MAPI")
Set objFolder = olNS.Folders.Item(1)
y...
Hiya,
I'll have a look at .RowSourceType = "Value List" later on 2day.
meanwhile, here's my spec:
Microsoft XP Professional 5.1.2600 Service Pack1 Build 2600
Microsoft Excel 2002 (10.4302.4219) Service Pack2
ListBox type is "Microsoft Forms 2.0 ListBox"
In the Data Section of Properties for...
Sorry, I just can't find it.
I can change this in the code though I guess:
With UserForm6.DisplayBox
.RowSourceType = whatever
End With
Can you tell me how to add the column headings? I know there is a value for rs.Fields(Col).Name, how do I assign that to the columns...
Hi,
I'm using VBA and not VB6. The "Row Source" option in the properties window for the ListBox accepts text but has no presets and nothing happens when I double click on it.
Setting the default column count is ok though.
Any suggestion what I'm doing wrong?
Tranman,
Thanks for getting back to me. I'm having some trouble implementing your suggestions.
It's a problem for me to have the right number of columns defined for the listbox, as the user can specify the SQL query that builds the recordset (therefore the number of colunms can change a lot)...
Hiya,
Using VBA, I'm trying to fill a list box with the contents of a recordset. I'm being a thick as it's putting each field from the rset into a new item on this list. How do you put each field into a new column ???
ReDim Arr(1 To rs.Fields.Count - 1)
ReDim Lbox(1 To...
Hiya,
no that doesn't work. I'm using this con string:
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & mdb & _
";Persist Security info=False;Jet OLEDB:" & _
"System Database=system.mdw;" & _
"Password=pw;User ID=Admin"
But I get either workgroup information...
Hiya,
trying to connect to an access db that is password protected. I get a runtime error that says "Cannot start your application. The workgroup information file is missing or opened exclusively by another user"
The db in question is not open and the workgroup file is not missing, it's where...
...update rs!
Do While Not rsUpdate.EOF
If rsUpdate.Fields("RecType").Value = 2 Then
con2.Execute ("DELETE * FROM Mainframe WHERE DistID = '" _
& rsUpdate("DistID").Value & "'")
End If...
...to another?
'This bit works fine
Do While Not rsUpdate.EOF
If rsUpdate.Fields("RecType").Value = 2 Then
con2.Execute ("DELETE * FROM Mainframe " _
& "WHERE DistID = '" & rsUpdate("DistID").Value & "'")
ElseIf rsUpdate.Fields("RecType").Value = 1 Then...
...i = 0 To rsUpdate.Fields.Count - 1
If rsUpdate.Fields("RecType").Value = 2 Then
DistID = rsUpdate.GetRows(rsUpdate("DistID")(i)).Value
con2.Execute ("DELETE * FROM Mainframe " _
& "WHERE DistID = " & DistID)
End If
Next i
Loop
Can anyone help me out here?
I have a feeling I've answered the 1st part of this question myself!
I just copied the Access type library from a machine where it was installed, registered it and the connection opens and the data comes through!
I'm not sure this is the correct way of doing it however, and I do get a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.