简单访问数据库功能所需的帮助 [英] Help required for simple access database funtion
问题描述
大家好..在过去的几周里,我一直在从微软Access的在线网站和电子书中自学。对于一个新手我觉得我做得相当不错...大声笑。
Hi All.. Over the past weeks I have been teaching myself from online websites and ebooks about Microsoft Access. For a total newbie I think I have done fairly good... lol.
我创建了一个表格,当输入数据时,它会保存到数据库中。我在表单中添加了一个按钮,实际添加按钮没有问题,但我的问题是我无法按下按钮来执行我想要的操作。
单击按钮时,我希望刚刚完成的当前表单(新条目)通过ms outlook向一个特定的电子邮件地址(始终是相同的地址)发送电子邮件。我希望它只发送新的报名表。
I have created adatabase and created a form that when the data is entered it is saved to the database. I have added a button to the form, no problem in actually adding the button, but my problem is that I cannot get the button to do what I want it to do. When the button is clicked I want the current form that has just been completed (new entry) to send an email to just one specific email address (always the same address) by ms outlook. I want it to send only the new entry form.
我一遍又一遍地研究过网站。我可以设法获得一些代码示例,但我不知道如何使用它们或将它们写入我的数据库。所以我现在必须承认失败并寻求帮助。
I have researched websites over and over. I can manage to get some code examples but I have no idea how to use them or write them into my database. So I have to now admit defeat and ask for help.
我确信这只是为你们所有技术人员创造的一个非常小而简单的事情。如果您能给我任何帮助,我将不胜感激。我的电子邮件地址是kevin_vince@live.co.uk。
I'm sure that this only a very minor and simple thing to create for all you techies out there. I would be grateful for any help that you can give me. My email address is kevin_vince@live.co.uk.
非常感谢。
问候,
凯文
推荐答案
既然你是除此之外,您可以采用正确的方式执行此操作,即创建有关该数据的报告,然后通过电子邮件发送报告(可能是PDF格式)。步骤:
Since you are new to this, you might as well do this the right way, which is to create a report about that data, and then email the report (probably as a PDF). Steps:
1。创建要由报告使用的查询。在Primary Key字段的Criteria行中,写下如下内容:
$
Forms!YourFormName!YourPkField
1. Create a query to be used by the report. In the Criteria line of the Primary Key field, write something like:
Forms!YourFormName!YourPkField
打开表单并运行查询。观察它从当前记录中提取数据。
Open the form and run the query. Observe it pulls the data from the current record.
2。根据此查询创建报告。
2. Create a report based on this query.
3。在按钮的单击事件中,使用DoCmd.SendObject并指定您的报告。
3. In your button's click event, use DoCmd.SendObject and specify your report.
这篇关于简单访问数据库功能所需的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!