文本字段默认值基于功能... [英] Text Field default value based on function...

查看:40
本文介绍了文本字段默认值基于功能...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好访问用户,


我正在努力解决以下问题:


我有一个有ID的表,一个人的代码和名字

我想在另一个名为History的表中插入记录(

中有一个person_id(与该人的id相关联)

表))

人员代码是从一个功能中获得的,该功能可以检测PC上当前的用户
用户

现在我有一个表格,并希望自动显示

这个人的名字......

并将该人的id插入历史表(person_id)

表格填写完毕后点击下一步在导航中(

插入一条记录)。


我环顾四周,搜索并尝试了几种方法让我去了

完成了这个,但没有运气。我真的很感激一些帮助

(通常如何处理这个问题?)。


(我真的不相信表单中的textfield对象是soo

限制甚至没有说出默认值的限制。)


Greets,


Tony

Hello fellow Access-users,

I am struggling with the following problem:

I have a Table wich has an id, code and name of a person
I would like to insert records in another Table called History (which
has a person_id in it (which is linked to the id from the person
Table))
The person code is gained from a function which detects the current
user on the PC
Now I have a form and would like to automatically display the name of
the person...
And insert the id of that person into the History Table (person_id)
when the form is filled and I click on "next" in the navigation (which
inserts a record).

I have looked around, searched and tried several ways to get me to
accomplish this, but no luck sofar. I really would appreciate some help
(how would one normally tackle this "problem"?).

(I really can''t believe that the textfield object in the form is soo
limited not even speaking of the limitations of the default value).

Greets,

Tony

推荐答案

继续寻找。你还没找到它。
http:/ /www.mvps.org/access/api/api0008.htm

Keep looking. you haven''t found it yet.
http://www.mvps.org/access/api/api0008.htm


继续寻找。你还没找到它。
http:/ /www.mvps.org/access/api/api0008.htm


好​​笑...当我按照指示将代码放入模块中然后设置

控件的默认值为

= fOSUserName()


它有魅力。


如果不环顾四周,我真的不敢相信你。

你搜索NG寻找答案吗?谷歌呢?

Keep looking. you haven''t found it yet.
http://www.mvps.org/access/api/api0008.htm

Funny... when I put the code in the module as instructed and then set
the control''s default value to
=fOSUserName()

it works a charm.

I really can''t believe you rant that much without looking around. did
you search the NG for an answer? Google for it?





是的我正在使用该功能(请原谅我咆哮 ; ... lol)和是

你可以设置为默认值,但是......它不是我要显示的那个特定的

值。该功能显示的是

人的代码,我想显示该人的姓名(来自相同的

表),并希望使用该ID当插入

新记录以将其链接到具有

匹配id值的其他表(插入主记录的位置)时,值(来自同一个表) 。

Hi,

Yes I am using that function (excuse me for "ranting"...lol) and yes
you can set that for the default value, but ...it''s not that specific
value I want displayed. What the function displays is the code of the
person, I would like to display the name of the person (from the same
Table) and would want to use the id value (from the same Table) when a
new record is inserted to link it to the other Table that has a
matching id value (where the main record is inserted).


这篇关于文本字段默认值基于功能...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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