需要一个命令按钮才能在Access 2013中执行多个作业 [英] Need one command button to do several jobs in Access 2013

查看:114
本文介绍了需要一个命令按钮才能在Access 2013中执行多个作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用于回流测试的数据库。该数据库包含3个表:客户信息,测试日期和实际文档的超链接以及发票信息。


我已经与客户ID周围的表建立了关系。


用户可以选择客户端并单击打开客户端信息。命令按钮。


从客户信息表中我创建了一个命令按钮,用于打开发票表单并插入所选客户表单中的信息。


从发票表单中我创建了一个命令按钮,将发票保存为pdf。


这是我希望您可以提供的帮助:我想要另存为pdf命令按钮做几个任务。


1:另存为pdf,2:保存到桌面上的临时文件夹,3:根据FirstName,Lastname字段保存为文件名,最后保存打开aol电子邮件,以便将其发送给客户。


我已经完成了将其保存为pdf并输入了输出文件信息。但我得到一个错误,说文件打开时我无法保存它。如果我删除输出文件信息,它允许我将其保存为pdf,但我必须选择位置。


我知道我问了很多你,但我希望你能帮助我

I have a built a database for backflow testing. The database contains 3 tables: Client Information, Testing Date and hyperlinks to actual document and Invoice information.

I have built the relationships with the tables around the client ID.

The user can select the client and click on a "Open Client Information" command button.

From the client information form I have created a command button that will open the invoice form and insert the information from the selected client form.

From the invoice form I have created a command button that saves the invoice as a pdf.

This is what I am hoping you can help with: I want the Save as pdf command button to do several tasks.

1: save as pdf, 2: save it to a temporary folder on desktop, 3: save it as file name based on FirstName, Lastname fields, and lastly open up aol email so that it can be sent to client.

I have accomplished saving it as a pdf and I entered the output file information. But I get an error saying I cannot save it while the file is open. If I delete the Output file information it allows me to save it as a pdf but I have to choose location.

I know I am asking a lot of you, but I hope you can help me

推荐答案

你好Vemy。


总体来说可能会有很多,但让我们开始吧在开始的时候看看我们在哪里挣扎以及在哪里。


我认为你的第一步(下一步)就是向你展示你到目前为止你所拥有的代码的方式。重新用于创建和保存PDF。请记住,在发布代码时,要考虑发布前的所有项目(VBA或SQL)代码


使用代码还请包含有关代码中哪些内容出错的信息。如果代码在[CODE]标签中正确发布,那么它也会有行号,您可以使用这些行号来识别发生在哪里。
Hi Vemy.

It may turn out to be a lot overall, but let''s start at the beginning and see what we struggle with and where.

I think your first (next) step is to show us what you have so far in the way of the code you''re using to create and save the PDF. Please remember, when posting code, to consider all the items in Before Posting (VBA or SQL) Code.

With the code please also include information as to what goes wrong at which point in the code. If the code''s posted properly in the [CODE] tags then it will also have line numbers which you can use to identify what happens where.


好的,有可能让你转弯远离我,因为我65岁,显然有人开始在27岁时失去脑细胞...谁知道我离开了多少...我必须告诉你我没有做代码。我使用命令按钮功能在宏创建,将其保存为PDF格式。它工作,但当我想将它保存到桌面上的临时文件夹时,我一直得到同样的错误。使用命令按钮,我选择了Exportwithformatting和Exportwithformatting。对象类型是表单,对象名称是backflow认证,输出格式是pdf。


所有这一切都奏效了。但是在宏中还有一行是输出文件。它允许您告诉它您要存储pdf的位置。每次我放入这行...然后尝试运行宏我有一个msg框,告诉我它没有工作的几个原因之一...我没有权限...文件是开放的...等等。

这足以帮助你帮助我我可以将它从嵌入式宏改为事件程序并给你那些代码,然后重新输入。但请记住,当我刚刚出生的18台计算机上大学...我编写的课程取决于显示你是否每天节省一分钱,复制十年内的成绩。
Ok at the risk of having you turn away from me because I am 65 and apparently one starts losing brain cells at 27...who knows how many I have left...I must tell you I did not do a code. I used the command button function to create at macro that would save it as a pdf. It worked but when I wanted to save it to a temporary folder on the desk top I kept getting the same error. With the command button I chose "Exportwithformatting" the object type was a form, the object name was backflow certification, and the output format was pdf.

All of this worked. but in the macro there is also a line that is "output file" which allows you to tell it where you want to store the pdf. Everytime I put in this line..and then tried to run the macro I got a msg box, telling me it did not work for one of several reasons...I did not have permission...the file was open...etc.
Is that enough to help you help me I can change it from an "embedded macro to an event procedure and give you that code and then retype that out..but please remember, when I went to college at 18 computers were just born...the class I took on coding was hinged upon showing if you saved a penny a day compounded what it would be in ten years.


展开 | 选择 | Wrap | 行号


这篇关于需要一个命令按钮才能在Access 2013中执行多个作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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