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 - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Error: Object required "dbe" Line No 25



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 6th 06, 01:00 AM posted to microsoft.public.outlook.program_forms
Lesley
external usenet poster
 
Posts: 6
Default Error: Object required "dbe" Line No 25

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
  #2  
Old December 6th 06, 01: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

  #3  
Old December 6th 06, 06:15 PM posted to microsoft.public.outlook.program_forms
Lacey
external usenet poster
 
Posts: 4
Default Error: Object required "dbe" Line No 25

NOPE,,,didn't like that!!! Now, I have a script error that reads: "object
doesn't support this property or method: "appAccess.Workspaces"."

"Sue Mosher [MVP-Outlook]" wrote:

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


  #4  
Old December 6th 06, 07:42 PM 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

That just goes to show why you ought to ask Access code questions in an Access forum. I finally recalled that Workspace is a DAO object. You need to instantiate dbe as a DAO.DBEngine object; see http://support.microsoft.com/kb/152400

--
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

"Lacey" wrote in message ...
NOPE,,,didn't like that!!! Now, I have a script error that reads: "object
doesn't support this property or method: "appAccess.Workspaces"."

"Sue Mosher [MVP-Outlook]" wrote:

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


  #5  
Old December 6th 06, 09:03 PM posted to microsoft.public.outlook.program_forms
Lacey
external usenet poster
 
Posts: 4
Default Error: Object required "dbe" Line No 25

Sorry,,,I thought I made it clear that I was creating an Outlook template
where I wanted to import data from MS Access into the template combo dropdown
boxes. The link you provide references EXCEL and not OUTLOOK. Is this code
good for both???

"Sue Mosher [MVP-Outlook]" wrote:

That just goes to show why you ought to ask Access code questions in an Access forum. I finally recalled that Workspace is a DAO object. You need to instantiate dbe as a DAO.DBEngine object; see http://support.microsoft.com/kb/152400

--
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

"Lacey" wrote in message ...
NOPE,,,didn't like that!!! Now, I have a script error that reads: "object
doesn't support this property or method: "appAccess.Workspaces"."

"Sue Mosher [MVP-Outlook]" wrote:

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



  #6  
Old December 6th 06, 09:16 PM 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

That was quite clear, but I think you missed my point: The code giving you problems is the part that refers to your Access database. It involves no Outlook programming issues at all. The part that has the problems is all DAO code. I just grabbed the first relevant DAO.DBEngine example I saw. . It should work the same regardless of whether you write the code in Access VBA, Outlook VBA or Excel VBA. Feel free to Google for other examples.

--
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

"Lacey" wrote in message ...
Sorry,,,I thought I made it clear that I was creating an Outlook template
where I wanted to import data from MS Access into the template combo dropdown
boxes. The link you provide references EXCEL and not OUTLOOK. Is this code
good for both???

"Sue Mosher [MVP-Outlook]" wrote:

That just goes to show why you ought to ask Access code questions in an Access forum. I finally recalled that Workspace is a DAO object. You need to instantiate dbe as a DAO.DBEngine object; see http://support.microsoft.com/kb/152400

"Lacey" wrote in message ...
NOPE,,,didn't like that!!! Now, I have a script error that reads: "object
doesn't support this property or method: "appAccess.Workspaces"."

"Sue Mosher [MVP-Outlook]" wrote:

Try replacing dbe with appAccess.



"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



  #7  
Old December 6th 06, 09:28 PM posted to microsoft.public.outlook.program_forms
Lacey
external usenet poster
 
Posts: 4
Default Error: Object required "dbe" Line No 25

ok,,,THANKS!!! I'm working on in now...

"Sue Mosher [MVP-Outlook]" wrote:

That was quite clear, but I think you missed my point: The code giving you problems is the part that refers to your Access database. It involves no Outlook programming issues at all. The part that has the problems is all DAO code. I just grabbed the first relevant DAO.DBEngine example I saw. . It should work the same regardless of whether you write the code in Access VBA, Outlook VBA or Excel VBA. Feel free to Google for other examples.

--
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

"Lacey" wrote in message ...
Sorry,,,I thought I made it clear that I was creating an Outlook template
where I wanted to import data from MS Access into the template combo dropdown
boxes. The link you provide references EXCEL and not OUTLOOK. Is this code
good for both???

"Sue Mosher [MVP-Outlook]" wrote:

That just goes to show why you ought to ask Access code questions in an Access forum. I finally recalled that Workspace is a DAO object. You need to instantiate dbe as a DAO.DBEngine object; see http://support.microsoft.com/kb/152400

"Lacey" wrote in message ...
NOPE,,,didn't like that!!! Now, I have a script error that reads: "object
doesn't support this property or method: "appAccess.Workspaces"."

"Sue Mosher [MVP-Outlook]" wrote:

Try replacing dbe with appAccess.



"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




  #8  
Old December 7th 06, 12:35 AM posted to microsoft.public.outlook.program_forms
Lacey
external usenet poster
 
Posts: 4
Default Error: Object required "dbe" Line No 25

Ok, this seems to be very complicated...would it be earier just to create a
table/file with the values? For example, I need a Subject List combo box
with the following values: Leave of Absence, Benefits, Internal Transfer,
Open Enrollment, etc. Then I need a corresponding Subtopic List combo box
that would show me the subtopcis under each of these categories. This same
data is stored in MS Access Database tables, but I'm not that familiar with
VBS. Any recommondations?

"Sue Mosher [MVP-Outlook]" wrote:

That was quite clear, but I think you missed my point: The code giving you problems is the part that refers to your Access database. It involves no Outlook programming issues at all. The part that has the problems is all DAO code. I just grabbed the first relevant DAO.DBEngine example I saw. . It should work the same regardless of whether you write the code in Access VBA, Outlook VBA or Excel VBA. Feel free to Google for other examples.

--
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

"Lacey" wrote in message ...
Sorry,,,I thought I made it clear that I was creating an Outlook template
where I wanted to import data from MS Access into the template combo dropdown
boxes. The link you provide references EXCEL and not OUTLOOK. Is this code
good for both???

"Sue Mosher [MVP-Outlook]" wrote:

That just goes to show why you ought to ask Access code questions in an Access forum. I finally recalled that Workspace is a DAO object. You need to instantiate dbe as a DAO.DBEngine object; see http://support.microsoft.com/kb/152400

"Lacey" wrote in message ...
NOPE,,,didn't like that!!! Now, I have a script error that reads: "object
doesn't support this property or method: "appAccess.Workspaces"."

"Sue Mosher [MVP-Outlook]" wrote:

Try replacing dbe with appAccess.



"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




  #9  
Old December 7th 06, 01:45 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

If the data is stored in an Access database, you must use database techniques to extract it; you can use DAO or ADO, your choice. If the data is stored in a file, you must use file access techniques to extract it; FileSystemObject is the easiest, in my opinion.

Regardless, the data isn't going to pop into the combo boxes without some coding effort on your part. I would recommend getting the data as an ADO recordset, because then it's a piece of cake to fill a combo box; see http://www.outlookcode.com/d/formcontrols.htm#listcombo

--
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

"Lacey" wrote in message ...
Ok, this seems to be very complicated...would it be earier just to create a
table/file with the values? For example, I need a Subject List combo box
with the following values: Leave of Absence, Benefits, Internal Transfer,
Open Enrollment, etc. Then I need a corresponding Subtopic List combo box
that would show me the subtopcis under each of these categories. This same
data is stored in MS Access Database tables, but I'm not that familiar with
VBS. Any recommondations?

"Sue Mosher [MVP-Outlook]" wrote:

That was quite clear, but I think you missed my point: The code giving you problems is the part that refers to your Access database. It involves no Outlook programming issues at all. The part that has the problems is all DAO code. I just grabbed the first relevant DAO.DBEngine example I saw. . It should work the same regardless of whether you write the code in Access VBA, Outlook VBA or Excel VBA. Feel free to Google for other examples.


"Lacey" wrote in message ...
Sorry,,,I thought I made it clear that I was creating an Outlook template
where I wanted to import data from MS Access into the template combo dropdown
boxes. The link you provide references EXCEL and not OUTLOOK. Is this code
good for both???

"Sue Mosher [MVP-Outlook]" wrote:

That just goes to show why you ought to ask Access code questions in an Access forum. I finally recalled that Workspace is a DAO object. You need to instantiate dbe as a DAO.DBEngine object; see http://support.microsoft.com/kb/152400

"Lacey" wrote in message ...
NOPE,,,didn't like that!!! Now, I have a script error that reads: "object
doesn't support this property or method: "appAccess.Workspaces"."

"Sue Mosher [MVP-Outlook]" wrote:

Try replacing dbe with appAccess.



"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




 




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
"object is missing" error in send/receive POP3 roscoe Outlook - Installation 1 November 16th 06 05:03 AM
Error message "an object can't be found" when sending mail Vikes Outlook - Installation 7 February 21st 06 02:37 AM
Outlook Error - "An Object Not Found" [email protected] Outlook - General Queries 2 February 18th 06 04:26 AM
When I try send emails I receive the error "object not found" 57chevy pickup Outlook - General Queries 1 January 21st 06 05:04 AM
Error when Sending/Receiving - "Object could not be found" Cissy Outlook - Installation 0 January 17th 06 01:42 AM


All times are GMT +1. The time now is 05:47 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.