自动更新表单上的字段 [英] Automatic Update of Field on a Form

查看:77
本文介绍了自动更新表单上的字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我在我在数据库中创建的表单中编写命令时遇到了困难。基本上,我有一个表单,其中有四个区域指示用户输入信息:帐户,组,用户名和日期。所有四个部分都设置为下拉框。我要做的是创建一个自动更新组的命令。基于帐户的名称。用户在表单上输入的数字。


这是我在表单上为组创建的文本框的控件源部分输入的命令:


= DLookUp([Group],Accounts,Oracle Account Number=" [Account Number]")


我认为这样做的目的是在我的表单上查找字段''Group',通过在''Accounts''表中搜索(这是创建的并且是我所有accont-的驱动程序)组合)并返回一个组名称,其中帐户表中的Oracle帐号与我表单上列出的帐号相匹配。


任何人都可以提供一些帮助吗?作为一个额外的信息,我不确定它是否重要,整个表格有一个完全不同的表的记录源。

Hello,

I am having difficulty programming a command in a form that i have created in my database. Basically, I have a form where there are four areas that the user is instructed to input information: Account, Group, User Name and Date. All four sections are set up as dropdown boxes. What I am trying to do is create a command that automatically updates the "Group" Name based on the "Account" number that is entered on the form by the user.

This is the command that i have input in the control source section of the text box created for ''Group'' on my form:

=DLookUp("[Group]","Accounts","Oracle Account Number"="[Account Number]")

What I thought this would accomplish is to look for the field ''Group'' on my form, by searching in the ''Accounts'' table (that is created and is my driver of all accont-group combinations) and returning a ''Group'' name where the ''Oracle Account Number'' in the ''Accounts'' table matches the ''Account Number'' listed on my form.

Can anyone provide some assistance with this? As an additional piece of information, and I am not sure if it matters, the entire form has a record source of an entirely different table.

推荐答案

我可以''我真的遵循你所要求的逻辑。但是,我认为您应该查看以下教程,因为它们可以帮助您。

级联组合/列表框
过滤表单
I can''t really follow the logic of what you are asking. However, I think you should check out the following tutorials as they may be able to help you.

Cascading combo/list boxes
Filtering on a form


谢谢。


让我试着澄清一下我想做什么。


我在表单上有四个字段,它们都是组合框,并指示用户为这三个字段进行选择。我想将其中一个盒子更改为一个tex盒子,一旦其他一个组合盒被填充就会自动更新。


为了说明,一个组合框被命名为'' OracleAccountNumber'。一旦它有一个帐号,我希望文本框''Group''自动更新其指定的组。


我有一个名为''Accounts'的表,其中存储所有帐户组组合。也许我提出的代码是错误的方法。


清除它了吗?在一天结束时,我不希望该组成为用户选择的内容,但我仍然希望用户能够看到此表单上列出的组。

感谢您的回复。
Thanks.

Let me try to clarify what I am trying to do.

I have four fields on a form that are all combo boxes, and the users are instructed to make selections for all three. I want to change one of those boxes to a tex box, one that automatically updates once one of the other combo boxes is populated.

To illustrate, the one combo box is named ''OracleAccountNumber''. Once it has an account number, I want the text box, ''Group'', to automatically update with its assigned group.

I have a table named ''Accounts'' where all Account-Group combinations are stored. Maybe the code I was presenting was the wrong way to go about it.

Does that clear it up? At the end of the day, I don''t want the group to be something that is chosen by the user, but I still want the user to be able to see the Group listed on this form.

Thanks for the response.


我给你的教程没有解决这些问题。级联组合框至少应解决第一部分。
Do the tutorials I gave you not solve these problems. The cascading combo boxes at least should solve the first part.


这篇关于自动更新表单上的字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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