Run-time error 2287

  • Thread starter Thread starter Gregg
  • Start date Start date
G

Gregg

I have a Run-time error problem on my Vista computer.

There are two computers involved,

The first one is Vista Home Premium SP1 with
Windows Mail Version 6.0.6000.16386 (vista_rtm.061101-2205)
and Access 2000 (9.0.2720) with the following References selected:
Visual Basic for Applications
MS Access 9.0 Object Library
MS DAO 3.6 Object Library
OLE Automation
MS ActiveX Data Objects 2.1 Library
MS Word 11.0 Object Library
MS Outlook 9.0 Object Library

The second is XP Professional Version 2002 SP2
with Outlook Express 6 Version 6.00.2900.2180 (xpsp_sp2_rtm.040803-2158)
and Access 2000 (9.0.2720) with the following References selected:
Visual Basic for Applications
MS Access 9.0 Object Library
MS DAO 3.6 Object Library
OLE Automation
MS ActiveX Data Objects 2.1 Library
MS Word 11.0 Object Library
MS Outlook 11.0 Object Library

I have an Access Form with a Command Button to send email with the following
code.

Private Sub MySendEmail_Click()
Dim stDocName As String
Dim stLinkCriteria As String
Dim Subject As String
Dim message As String

If IsNull() Or ([Email]) = "" Then
MsgBox "There is no E-mail address entered for this person!"
Exit Sub
Else
stLinkCriteria = [Forms]![EmailForm]![Email]
stSubject = "Re: Your Application"
stMessage = [Forms]![EmailForm]![message]
DoCmd.SendObject acSendNoObject, , , stLinkCriteria, , , stSubject,
stMessage, True
End If
End Sub

The form and code work just fine on the XP machine.

The problem is on the Vista machine, with Windows Mail open and working fine,
when I click the Command Button I get the following:
Run-time error '2287': can't open the mail session.

Note: On the Vista machine, if I use a Command Button with a Hyperlink Address
in Properties, It works just fine.


Any help would be appreciated.
 
Gregg, I don't have an answer, so hopefully someone else can help solve the
problem. It may be little more than a permissions issue on Vista. Or perhaps
it has to do with the different versions of Outlook (9 verses 11) or Outlook
Express verses Windows Mail.

In any case, I am really bothered that you are using the original, unpatched
version of Access 2000. That is a disaster waiting to happen. From memory,
SP1 for Office 2000 addressed around 300 bugs in Access alone, so you're a
very brave soul to trust that version.

I seriously doubt that applying the service packs for Office 2000 will solve
the issue you posted about, but in my business I refuse to support anyone
using unpatched Office 2000 because it's just too unstable. You can get the
updates from:
http://support.microsoft.com/sp
Be sure to get the JET 4 service pack as well (at least SP8 for JET 4.)

Sorry I couldn't solve your current issue, but I hope this saves you from
some other grief.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Gregg said:
I have a Run-time error problem on my Vista computer.

There are two computers involved,

The first one is Vista Home Premium SP1 with
Windows Mail Version 6.0.6000.16386 (vista_rtm.061101-2205)
and Access 2000 (9.0.2720) with the following References selected:
Visual Basic for Applications
MS Access 9.0 Object Library
MS DAO 3.6 Object Library
OLE Automation
MS ActiveX Data Objects 2.1 Library
MS Word 11.0 Object Library
MS Outlook 9.0 Object Library

The second is XP Professional Version 2002 SP2
with Outlook Express 6 Version 6.00.2900.2180 (xpsp_sp2_rtm.040803-2158)
and Access 2000 (9.0.2720) with the following References selected:
Visual Basic for Applications
MS Access 9.0 Object Library
MS DAO 3.6 Object Library
OLE Automation
MS ActiveX Data Objects 2.1 Library
MS Word 11.0 Object Library
MS Outlook 11.0 Object Library

I have an Access Form with a Command Button to send email with the
following
code.

Private Sub MySendEmail_Click()
Dim stDocName As String
Dim stLinkCriteria As String
Dim Subject As String
Dim message As String

If IsNull() Or ([Email]) = "" Then
MsgBox "There is no E-mail address entered for this person!"
Exit Sub
Else
stLinkCriteria = [Forms]![EmailForm]![Email]
stSubject = "Re: Your Application"
stMessage = [Forms]![EmailForm]![message]
DoCmd.SendObject acSendNoObject, , , stLinkCriteria, , , stSubject,
stMessage, True
End If
End Sub

The form and code work just fine on the XP machine.

The problem is on the Vista machine, with Windows Mail open and working
fine,
when I click the Command Button I get the following:
Run-time error '2287': can't open the mail session.

Note: On the Vista machine, if I use a Command Button with a Hyperlink
Address
in Properties, It works just fine.


Any help would be appreciated.[/QUOTE]
 
Back
Top