473,545 Members | 2,032 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: MSAccess Runtime Error

On Thu, 30 Oct 2008 11:04:44 GMT, "JOHNNY OUTING" <ou******@att.n et>
wrote:

You managed to violate several netiquette rules in one post. Please
review http://www.mvps.org/access/netiquette.htm
This is a text-only newsgroup (you could have captured the error
message with Ctrl+C), and if you can't be bothered to check back for
messages, why would we make the effort to answer in the first place?

RunCode is designed to call a public FUNCTION, not a sub.

Also make sure you check the results of CreateObject; don't assume it
works:
if appOutlook is nothing then
Msgbox "Aarrrrcchh h, Outlook not installed?"
else
Set MailOutlook... etc.
end if

..To takes a string, like "mailbox@domain "

-Tom.
Microsoft Access MVP

>Below is a sample code that processes an Email using Microsoft Outlook in the background. From this code I've done the following:
a.. The database it is incorporated into is a MSAccess '97 multi-user secured database that is used in a Citrix Environment
b.. I've incorporated this code into a Module.
a.. From the Menu in the Design view of this module, I select --Tools --References --"Microsoft Outlook 8.0 Object Library"
c.. From the command button on one of my Forms, it processes a macro using "Runcode" TestMail ().
d.. When I test the code using the command button it works for me
e.. I've given the other users permission to the module where the code is stored but the code only works for me and not the other users
a.. NOTE: prior to me using this "Runcode", I used the macro "SendMail" and it works for all the users
The problem is when the other users try using this same command button that processes this module by using the macro "Runcode" - testmail(), it gives the following run-time error message: "Run-time error '-2147287035 (80030005)': You don't have appropriate permission to perform this operation." HELP!!!!!!!!
P.S. When you post to your newsgroup, please also reply to this email address as well: jo************* *@boeing.ksc.na sa.gov

Thanks
--------------------------------------------------------------------------------

'============= =============== =============== ===============

Public Sub TestMail()

Dim appOutLook As Object

Dim MailOutLook As Object

Dim strMSG As String

Set appOutLook = CreateObject("O utlook.Applicat ion")

Set MailOutLook = appOutLook.Crea teItem(olMailIt em)

strMSG = "How are you, my friend!"

With MailOutLook

.To = mailbox@domain

.Subject = "hello"

.Body = strMSG

.Send

End With

Set appOutLook = Nothing

End Sub

'============= =============== =============== =============== ==


Oct 30 '08 #1
3 2962
I implemented the code as you requested but it still gives a runtime error
for the other users. It works for me but not the other users.

--
JOHNNY OUTING
"Tom van Stiphout" <to************ *@cox.netwrote in message
news:88******** *************** *********@4ax.c om...
On Thu, 30 Oct 2008 11:04:44 GMT, "JOHNNY OUTING" <ou******@att.n et>
wrote:

You managed to violate several netiquette rules in one post. Please
review http://www.mvps.org/access/netiquette.htm
This is a text-only newsgroup (you could have captured the error
message with Ctrl+C), and if you can't be bothered to check back for
messages, why would we make the effort to answer in the first place?

RunCode is designed to call a public FUNCTION, not a sub.

Also make sure you check the results of CreateObject; don't assume it
works:
if appOutlook is nothing then
Msgbox "Aarrrrcchh h, Outlook not installed?"
else
Set MailOutlook... etc.
end if

.To takes a string, like "mailbox@domain "

-Tom.
Microsoft Access MVP

>>Below is a sample code that processes an Email using Microsoft Outlook in
the background. From this code I've done the following:
a.. The database it is incorporated into is a MSAccess '97 multi-user
secured database that is used in a Citrix Environment
b.. I've incorporated this code into a Module.
a.. From the Menu in the Design view of this module, I select -->
Tools --References --"Microsoft Outlook 8.0 Object Library"
c.. From the command button on one of my Forms, it processes a macro
using "Runcode" TestMail ().
d.. When I test the code using the command button it works for me
e.. I've given the other users permission to the module where the code
is stored but the code only works for me and not the other users
a.. NOTE: prior to me using this "Runcode", I used the macro
"SendMail" and it works for all the users
The problem is when the other users try using this same command button
that processes this module by using the macro "Runcode" - testmail(), it
gives the following run-time error message: "Run-time error '-2147287035
(80030005)' : You don't have appropriate permission to perform this
operation." HELP!!!!!!!!
P.S. When you post to your newsgroup, please also reply to this email
address as well: jo************* *@boeing.ksc.na sa.gov

Thanks
--------------------------------------------------------------------------------

'============ =============== =============== =============== =

Public Sub TestMail()

Dim appOutLook As Object

Dim MailOutLook As Object

Dim strMSG As String

Set appOutLook = CreateObject("O utlook.Applicat ion")

Set MailOutLook = appOutLook.Crea teItem(olMailIt em)

strMSG = "How are you, my friend!"

With MailOutLook

.To = mailbox@domain

.Subject = "hello"

.Body = strMSG

.Send

End With

Set appOutLook = Nothing

End Sub

'============ =============== =============== =============== ===



Oct 30 '08 #2
On Thu, 30 Oct 2008 18:00:10 GMT, "JOHNNY OUTING" <ou******@att.n et>
wrote:

I have no other suggestions, but I noticed your email address has the
nasa.gov domain, which in my imagination means a more-than-average
secured environment, so perhaps the error message is true: the user
does not have programmatic rights to perform this operation.

Btw another besides-the-point observation: if you set a reference to
Outlook, you are using "early binding", whereas your code snippet uses
"late binding" which does not make sense.

-Tom.
Microsoft Access MVP

>I implemented the code as you requested but it still gives a runtime error
for the other users. It works for me but not the other users.
Oct 31 '08 #3
Thanks for sharing your expertise!

--
JOHNNY OUTING
"Tom van Stiphout" <to************ *@cox.netwrote in message
news:sh******** *************** *********@4ax.c om...
On Thu, 30 Oct 2008 18:00:10 GMT, "JOHNNY OUTING" <ou******@att.n et>
wrote:

I have no other suggestions, but I noticed your email address has the
nasa.gov domain, which in my imagination means a more-than-average
secured environment, so perhaps the error message is true: the user
does not have programmatic rights to perform this operation.

Btw another besides-the-point observation: if you set a reference to
Outlook, you are using "early binding", whereas your code snippet uses
"late binding" which does not make sense.

-Tom.
Microsoft Access MVP

>>I implemented the code as you requested but it still gives a runtime error
for the other users. It works for me but not the other users.

Nov 5 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2177
by: Phillip Lyles | last post by:
Hi Everybody, I am setting up several users to run the runtime version of msaccess 2002. All the files run fine with the runtime version except one, and when I run it all I get is a blank screen. All of these files where converted from msaccess 97 to msacess 2002 and run fine in 2002. I will be thankful for any help anybody can give...
0
1577
by: Richard Beacroft | last post by:
Trying to write a C# Windows App to export all objects and content from 2 MSAccess 97 databases for comparison analysis. very little documentation found. Have managed to instantiate MSAccess, load database and iterate through relevant objects. Call to TransferText raises error: "Bad Variable Type" error. Call to SaveAsText raises error:...
14
2461
by: Mark B | last post by:
Our webhost (www.usbusinessweb.net) had a W2K IIS5 server crash after a scheduled hard-boot occurred during a ms-security patch install overnight. They couldn't get the server working again so they transferred our site www.orbisoft.com to a new W2003 IIS6 server they set up. That was a week ago. Since that transfer, all of our ASPX pages...
0
1003
by: Steven Thomas | last post by:
I have a vb.net application that calls a sub in MSAccess. I have loaded the office interops and everything works fine if there are no errors. If the sub in Access produces an Error then my application hangs and goes no further. In the example I am testing with I get and ODBC error because I am passing to many parameters to a stored...
0
1573
by: MLH | last post by:
I've been unable to determine the correct setting to force a copy of msaccess.exe to be written to target disk during runtime installation process. It may be that the runtime installation determines if msaccess.exe exists somewhere on the target drive and is being "smart" choosing not to write a redundant copy of it. But I'm not as...
0
2232
by: Mark 123 | last post by:
Hi I have been trying to find a solution to the following issue reported by one of our clients: We are trying to install on Windows 2003 server with Terminal Server. We are getting the following error when users try to run the app: "Faulting application Msaccess.exe, version 8.0.0.5903, faulting module unknown,
1
1300
by: mike.arsenault | last post by:
Hi there, Have a couple of questions about applications developed using MSAccess. 1. Is there a way to run and use you application OUTSIDE of the MSAccess main window? In other words, can you use the application and make it look like it has nothing to do with Access? If so, how? 2. If the answer to (1) is yes, when deploying you...
0
2010
by: bbrewder | last post by:
I am struggling with some MSAccess automation issues. Basically, we have a .Net application that uses MSAccess for reporting (legacy code). We are able to launch MSAccess fine and even work with the MSAccess COM objects to run our reports (using GetObject(<MDB Path>) - see...
1
1454
by: chrisdev3 | last post by:
How can I open the Access Options Window from "Office Button" in MSAccess 2007 ? I have a runtime of MSAccess and I need to Add New Location in Trusted Locations tab. Thanks a lot in advance.
0
7664
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7921
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7437
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5982
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5343
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1900
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1023
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
720
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.