无法自动填写表单字段 [英] Unable to autofill form fields
问题描述
大家好。
我现在正处于疯狂的状态,因为我现在已经尝试了两周以下,所以我迫切需要一些帮助。
我已经设置了一个包含各种组合和文本框的表单。其中一个名为Username的组合框,包含一个下拉菜单,用户可以从中选择Lastname,Firstname(此字段使用表达式从一个从AS400服务器链接的表中提取信息,其中Lastname和Firstname存在于单独的字段)。
选择此用户名后,我希望其他文本框自动填写与所选用户名相对应的其余数据,如员工编号,地址,电话号码,工作标题等
我尝试了各种各样的工作方法,不同的代码等等,但似乎无法让它工作。(你会认为像这样的程序会是Access中常见的事情,但是我错了)
任何对此的帮助都会非常感激
提前致谢
Hello all
I am now at the point of going mad as I have been trying to do the below for 2 weeks now so I am desperate need of some help.
I have set up a form with various amounts of combo and text boxes. One of the combo boxes called Username, consits of a dropdown menu from which a user can select Lastname,Firstname ( This filed uses a expression to pull the information together from a table which is linked from a AS400 server, where Lastname and Firstname exists in seperate fields).
Once this username is selected I want other text boxes to automatically fill with the rest of the data corresponding to the slected username like Employee number,Address,phone number,job title etc.
I have tried all sorts of workmethods,differerent code and so forth, but just cannot seem to get it to work.(You would think that a procedure like this would be a common thing to do in Access, but hey I am wrong)
Any help on this would be sooo much appreciated
Thanks in advance
推荐答案
一个简单的解决方案可能是为你的桌子创建一个有界形式(链接)
从组合中选择,loa d记录(你可以使用Me.Filter)
A simple solution might be to create a bounded form to your table (linked)
On selection from combo, load the record (u can use Me.Filter)
你好
非常感谢您的回复。我是Access和VBA的新手,所以这可能需要一段时间,但我会给你一个很好的建议,看看它是否有效。
非常感谢
Hi
Thank you very much for your reply. I am new to Access and VBA, so this might take a while , but I will give your suggestion a very good go and see if it works.
Thanks a lot
您是否尝试过带子表单的表单?
Have you tried a form with a subform?
这篇关于无法自动填写表单字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!