用户在使用SendObject时取消电子邮件时Access 2007崩溃 [英] Access 2007 crashes when users cancel email while using SendObject

查看:84
本文介绍了用户在使用SendObject时取消电子邮件时Access 2007崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不是程序员,我通常使用宏来完成一些小功能。


这次我使用的是SendObject的宏。以Pdf格式发送报告。


当我在导航窗格中测试时,它运行良好被展示。但是在我隐藏导航窗格之后,问题出现了:

如果我通过点击X取消电子邮件。 outlook 2007窗口,系统崩溃。甚至无法关闭访问权限。对话窗口显示您现在无法退出Microsoft Office Access,如果您正在运行运行OLE或ODE的Visual Basic模块,则可能需要中断模块。它发出哔哔声,我必须使用Ctrl + Alt + Del。中断。

但是如果我发送电子邮件,那就没问题了。


我试过多次,如果导航窗格显示,我有机会在取消电子邮件和关闭Outlook窗口后回来访问。但是当它被隐藏时,问题总是会发生。


我不知道是否有隐藏导航窗格时与SendObject有关。


我试图将宏转换为VB模块并添加错误处理短语。但似乎错误窗口出现在错误处理短语运行之前。

I am not a programmer and I usually use macro to fulfill some small functions.

This time I use a Macro of "SendObject" to send report as Pdf format.

it is working well when I test it while "Navigation Pane" is displayed. But after I hide the "Navigation Pane", the problem appears:
If I cancel emailing by click "X" of outlook 2007 window,The system crashes. Access can not even be closed. The dialogue window shows"You can not exit Microsoft Office Access now", "If you''re running A Visual Basic Module that is running OLE or ODE, You may need to interrupt the module". it beeps and I have to use "Ctrl+Alt+Del" to interrupt.
But If I send e-mail out , it is no problem.

I tried many times that if "Navigation Pane" is displayed, I have chance to come back to access after cancelling the email and closing outlook window.But when it is hided, the problem always happens.

I do not know if there is something to do with SendObject when hiding "Navigation Pane".

I tried to converse the Macro into VB Module and add Error Handling phrases. But it seemed the error window appears before Error Handling phrases run.

展开 | 选择 | Wrap | 行号

推荐答案

所以...你通过宏发送电子邮件。

然后在宏完成动作之前,用户关闭应用程序(或尝试)...

这个这是我在Access中避免使用宏的原因之一,因为它们不会释放对象或shell,宏处理器会保持一个线程锁定进程,然后当某些东西停止进程时会发脾气。 br />

我认为你可以在Access2007中做的最好的尝试是错误陷阱: OnError宏操作


您不能在早期版本中执行此操作。
So... you send the email via macro.
Then before the macro can complete the action, the user closes the application (or attempts to)...
This is one of the reasons I avoid the macros in Access because they don''t release the object or the shell, the Macro processor keeps a thread locked to the process and then throws a tantrum when something stalls the process.

The best I think you can do in Access2007 is attempt to error trap: OnError Macro Action

You can not do this in earlier versions.


谢谢zmbd,


但我试图将宏转换为模块并添加错误处理短语。问题不会消失。


我尝试了相同的代码但只是使用更简单的报告。问题消失了。当我用导航窗格取消电子邮件时隐藏,我有机会回来访问。


所以我认为可能重点不是使用宏或VBA代码。也许这是由于我使用的报告中的某些内容。但我不确定问题是否与宏在设置加载时设置报告标题的值有关。或者其他一些因素会导致冲突。


让我做一些测试并回来看新闻......还有更好的主意吗?
Thank you zmbd,

But I tried to convert Macro into Module and add up Error handling phrases. The problem does not go away.

And I tried the same code but just to use a simpler report. the problem is gone. When I cancel the Email with "Navigation Pane" hided, I have chance to come back to access.

So I think that maybe the point is not to use macro or VBA code. maybe it is due to some thing from the report I used. But I am not sure if the problem is related to a macro which sets value of the report Caption while loaded. Or some other factors cause the conflict.

Let me do some test and come back with the news...any better idea?


如何你是否启动了发送电子邮件的代码?
How are you launching the code to send the email?


这篇关于用户在使用SendObject时取消电子邮件时Access 2007崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆