自动更新计数 [英] automatic update of count

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

问题描述

我正在使用Access 2010,我有一个问题。


我有一个表格,所有输入此表格的数据都保存在表格中(作为新记录)。 br />
所以每个条目都有一个IDnumber(不是唯一的)。

这个ID在表单中有一个文本字段,用户输入ID。

我想要的是,下次用户想要输入一些数据时,此ID的文本字段会自动拥有最后一个ID加一。


无论如何都要做这个??


非常感谢!!希望我足够清楚...

i am using access 2010 and i have a question.

I have a form and all data entered into this form is saved into a table (as a new record).
so each entry has a IDnumber (which is not unique).
this ID has a text field in the form, where the user enters the ID.
What i want is, the next time a user wants to enter some data, the text field for this ID automatically has the last ID plus one.

Is there anyway to do this??

Thanks a lot!! hope I was clear enough...

推荐答案

这就是 AutoNumber 数据类型是专为。它对你不起作用吗?
That''s what the AutoNumber datatype is designed for. Will it not work for you?


我确实知道自动编号,但这不适合这种情况。该ID必须由用户输入。它就像这样的D-001,D-002,D-003 ......


所以如果D001已填入表中,我想要D002在下次用户输入新信息时显示在表格上...
I do know about the autonumber, but that is not suitable in this situation. this ID has to be entered by the user. it goes like this "D-001, D-002, D-003......"

so if D001 is already filled in the table, i want D002 to show up on the form the next time the user enters new information...


这个问题非常相似:自动编号使用字母数字(文本和数字)数据类型


如果您难以适应它,请回复您目前已开发的代码,表格和列名称,以及您遇到的问题以及您认为可能有用的任何其他问题。
This Question is very similar: Autonumber Using alphanumeric (text and number) data type.

If you struggle adapting it, please post back what code you have developed so far, table and column names, and what problems you are experiencing along with anything else you think may be helpful.


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

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