如何从Access表填充表单域 [英] How to populate form fields from Access table

查看:69
本文介绍了如何从Access表填充表单域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两张桌子:组织&发票。我有一个名为Invoices的表单,用于将数据输入发票表。输入数据时,我希望能够输入[组织代码]字段,然后单击!用于运行SQL脚本的按钮....这将填充表单上的一些字段。在这里阅读了讨论后,我尝试了一些脚本,但它不起作用。不确定我是否在正确的轨道上。你能帮忙吗?

I have two tables: Organisations & Invoices. I have a form called Invoices that is used to enter data into the invoices Table. When entering data, I''d like to be able to type into the [Organisation Code] field, and then click on the ! button to run an SQL script....which will populate some of the fields on the form. Having read discussions here, I''ve tried some scripting but it does not work. Not sure if I''m on the right track even. Can you help?


展开 | 选择 | Wrap | 行号

推荐答案

好的,有一个代码中的错误很少

Ok, there are a few errors in your code

展开 | 选择 | Wrap | 行号


非常感谢您的帮助。我已经进行了语法修正。我取消了发票表格(记录来源),现在所有字段都显示#Name?并阻止我输入任何东西。有什么建议?谢谢。


==================================== ============== =

Many thanks for your help. I''ve made the syntax corrections. I unbound the Invoices form (Record Source) and now all the fields display #Name? and prevents me from typing anything. Any suggestions? Thanks.

================================================== =


好​​的,你的代码中有一些错误

Ok, there are a few errors in your code

展开 | 选择 | Wrap | 行号



非常感谢您的帮助。我已经进行了语法修正。我取消了发票表格(记录来源),现在所有字段都显示#Name?并阻止我输入任何东西。有什么建议?谢谢。
Many thanks for your help. I''ve made the syntax corrections. I unbound the Invoices form (Record Source) and now all the fields display #Name? and prevents me from typing anything. Any suggestions? Thanks.



您还需要取消绑定所有控件。检查每个文本框,因为它们可能仍将其控制源设置为字段。将它们全部设为空白。


Mary

You need to unbind all the controls as well. Check each of the textboxes as they probably still have their control source set to the field. Set them all blank.

Mary


这篇关于如何从Access表填充表单域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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