View Single Post
  #2  
Old December 6th 06, 12:58 AM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Error: Object required "dbe" Line No 25

Try replacing dbe with appAccess.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Lesley" wrote in message ...
Hi All!

I'm creating an Outlook 2003 template where I'm attempting to use combo
dropdown boxes, which import data from tables in MS Access. When I run the
template I get an "Object required "dbe" Line No. 25" error. What is this???
As of now, I was just working on the one combo box - cboSubject until I
could get that working; however, the form has four other combo boxes. Can I
merely duplicate the code once I get the first stage running? Here's the VB
script that I'm using...


Dim rst
Dim dao
Dim wks
Dim dbs
Dim nms
Dim fld
Dim itms
Dim itm
Dim strOfficePath
Dim appAccess
Dim SubjectArray(99, 2)

Function Item_Open()

FillComboBox()

End Function

Function FillComboBox()

Set appAccess = Item.Application.CreateObject("Access.Application" )
strOfficePath = appAccess.SysCmd(9)
strVersion = Item.Application.Version
strDBName = strOfficePath & "Contact Management Database_TEST.MDB"
Set wks = dbe.Workspaces(0)
Set dbs = wks.OpenDatabase("Cocuments and Settings\cisse\Desktop\Contact
Management Database_TEST.MDB")
appAccess.Quit

'Retrieve Category info from table
Set rst = dbs.OpenRecordset("tblSubtopicList")
Set ctl =
Item.GetInspector.ModifiedFormPages("Message").Con trols("cboSubject")

ctl.ColumnCount = 3
ctl.ColumnWidths = "0; 0; 75 pt"

'Assign Access data to an array of 3 columns and 100 rows
SubjectArray(99, 2) = rst.GetRows(100)

ctl.Column() = SubjectArray(99, 2)

End Function


Sub cmdFillComboBox_Click

FillComboBox()

End Sub

Ads