|
-
Jan 13th, 2006, 05:22 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] combo box in outlook vba not showing items
Hey,
I've manged to write with a lot of help from this forum, this small outlook vba code that shows a combo box for selecting items from an mdb file.
problem is:
1. When I put this code in the load form of the form it doesn't add any items to the combox, but if I add it to a dummy button then the combox items are loaded ok.
2. I'd like to add this combo box to a toolbar in outlook and not create a new form for it.
thanks, and here's my code:
AccessConnect = "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=my_DB.mdb;" & _
"DefaultDir=q:\;"
Conn1.ConnectionString = AccessConnect
Conn1.Open
Set Rs1 = Conn1.Execute("SELECT * FROM Customers")
Rs1.MoveFirst
While Not (Rs1.EOF)
Customer_Select.AddItem Rs1("customer_no") & "-" & Rs1("customer_name")
Rs1.MoveNext
Wend
Conn1.Close
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|