Can not email from form.

J

Jason

I get:
Run-time error '2292':

can't send message for the reason ated in the previous alert.
Resolve the problem, and then send the message again.

Microsoft Outlook 11.0 object library is ticked.
There is no previous stated alert.
I suspect this is caused by copying this database on to a computer with
Office XP/2002 and back to a computer with Office 2003.
Using Access 97.

Thanks,
J.
 
A

Arvin Meyer [MVP]

My believe that you are correct, it is because of the copying. Open any code
window and check the menu item:

Tools >>> References

then look at the one for Microsoft Outlook. It is most likely marked as
missing. Uncheck it and find the reference to the correct version of Outlook
on that particular computer. You may need to do that each time you move the
database. Broken references will cause many other issues as well and must be
fixed for the database to run. Check out Doug Steele's references page:

http://www.accessmvp.com/DJSteele/AccessReferenceErrors.html
 
T

Tony Toews [MVP]

Jason said:
can't send message for the reason ated in the previous alert.
Resolve the problem, and then send the message again.

Microsoft Outlook 11.0 object library is ticked.
There is no previous stated alert.
I suspect this is caused by copying this database on to a computer with
Office XP/2002 and back to a computer with Office 2003.

You might be best off changing to code so it doesn't matter what
version of Outlook is installed.

Late binding means you can safely remove the reference and only have
an error when the app executes lines of code in question. Rather than
erroring out while starting up the app and not allowing the users in
the app at all. Or when hitting a mid, left or trim function call.

This also is very useful when you don't know version of the external
application will reside on the target system. Or if your organization
is in the middle of moving from one version to another.

For more information including additional text and some detailed links
see the "Late Binding in Microsoft Access" page at
http://www.granite.ab.ca/access/latebinding.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
J

Jason

So I would put the following code in a new module and call it from my
startup form?

Dim ref As Reference

' 0 if Late Binding
' 1 if Reference to Outlook set.
#Const ExcelRef = 0
#If ExcelRef = 0 Then ' Late binding
Dim objXL As Object
Dim objWkb As Object
Dim objSht As Object
Set objXL = CreateObject("Outlook.Application")
' Remove the Excel reference if it is present - <=======
On Error Resume Next
Set ref = References!Outlook
If Err.Number = 0 Then
References.Remove ref
ElseIf Err.Number <> 9 Then 'Subscript out of range meaning not
reference not found
MsgBox Err.Description
Exit Sub
End If
' Use your own error handling label here
On Error GoTo tagError - <=======
#Else
' a reference to MS Outlook <> Object Library must be specified
Dim objXL As Outlook.Application
'Dim objWkb As Excel.Workbook
'Dim objSht As Excel.Worksheet
Set objXL = New Oultlook.Application
#End If
 
A

Arvin Meyer [MVP]

Jason said:
So I would put the following code in a new module and call it from my
startup form?

Dim ref As Reference

' 0 if Late Binding
' 1 if Reference to Outlook set.
#Const ExcelRef = 0
#If ExcelRef = 0 Then ' Late binding
Dim objXL As Object
Dim objWkb As Object
Dim objSht As Object
Set objXL = CreateObject("Outlook.Application")
' Remove the Excel reference if it is present - <=======
On Error Resume Next
Set ref = References!Outlook
If Err.Number = 0 Then
References.Remove ref
ElseIf Err.Number <> 9 Then 'Subscript out of range meaning not
reference not found
MsgBox Err.Description
Exit Sub
End If
' Use your own error handling label here
On Error GoTo tagError - <=======
#Else
' a reference to MS Outlook <> Object Library must be specified
Dim objXL As Outlook.Application
'Dim objWkb As Excel.Workbook
'Dim objSht As Excel.Worksheet
Set objXL = New Oultlook.Application
#End If
 
A

Arvin Meyer [MVP]

Sorry about the first post. I meant to close it, but sent it instead.

Late binding is a good solution for you if your are moving the database
around a lot. The lines in your code to look for are all the application
references that need changing to Object, for instance:

Dim objOutlook As Outlook.Application

would change to:

Dim objOutllook As Object
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
 
J

Jason

should it be Dim objOutLook As Object?

Arvin Meyer said:
Sorry about the first post. I meant to close it, but sent it instead.

Late binding is a good solution for you if your are moving the database
around a lot. The lines in your code to look for are all the application
references that need changing to Object, for instance:

Dim objOutlook As Outlook.Application

would change to:

Dim objOutllook As Object
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
 
J

Jason

I don't intend on copying back to that computer again - had enough of trying
to fix errors after copying back to this computer. The other computer is
really too slow for Access. But will use late binding incase I instal lan
empty copy of the database.
 
J

Jason

worked fine until copied over from being on another computer. Just normal
setup - nothing should stop sending.

Send report:
Access can't send a message for the reason staetd in the preceding alert.
Resolve the problem, and then send the message again.

There is no alert prior to this appearing.

Word - file -send as attachment is generating an error also so looks lile
Outlook problem.

Thanks,
 
J

Jason

Don't know what happened:
Went control panel - classic view - mail - looked at settings - closed -
catagory view.

Now Access, Excel and Word can send.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top