072610-002,日期和时间的组合ID,日期格式为mmddyy。 [英] 072610-002, ds s combination of Date & ID, the format of date is mmddyy.

查看:275
本文介绍了072610-002,日期和时间的组合ID,日期格式为mmddyy。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

072610-002,日期和时间的组合ID,日期的格式是mmddyy。

当日期变为072710时,如何将id返回001,它应该显示为072710-001

072610-002, ds s combination of Date & ID, the format of date is mmddyy.
how cn i make the id back to 001 when the date become 072710, it should appear like this 072710-001

推荐答案

你需要更清楚一点,你在这里要做什么。对我来说,看起来你在问如何将列的第二部分重置回001。每当日期改变,但我不能确定。


这是你想做的吗?如果是这样的话,到目前为止你做了什么才能实现呢?


Pat
You need to be a little more clear about what you''re trying to do here. To me, it looks like you''re asking how to reset the second part of the column back to "001" whenever the date changes, but I can''t be sure.

Is that what you want to do? If so, what have you done so far to make it happen?

Pat


thnx很多4 urp rply。 ur corect,我希望在更改日期时将ID重置为001。因为我有一个MS-Access2007程序 - 数据跟踪系统。我几乎完成了,这只剩下我的问题。

在我的表设计中我有字段名Doc No,From,Date Receive,To,Date Released,Sender,title,Subject&收件人。我将Doc No设置为autonumber。

并在我应用= Date()& " - " &安培;格式([ID],000)我得到了我想要的格式,但我的另一个问题是我的旧记录成为当前日期,即Doc No:这里是我的Doc No's之前072610-001,072710-002 ,072910-003,然后我应用代码后,他们成为当前日期073010-001,073010-002,073010-003而不是我的记录日期。我想让文档保存,所以当我明天添加记录时,它必须是不同的日期。我的旧记录Doc no一定不会受到影响。希望你现在明白。请。帮我
thnx alot 4 ur rply. ur corect, i want to reset the ID to 001 when the date changed. Coz i have a MS-Access2007 program-Data Tracking System. I almost done it, this s only my problem left.
in my table design i have field name Doc No, From, Date Receive, To, Date Released, Sender, title, Subject & Addressee. I set the Doc No to autonumber.
and wid ur help after i applied the =Date() & "-" & Format([ID],"000") i got the format i want, but my another problem is my old records became current date which is Doc No: here are my Doc No''s before 072610-001, 072710-002, 072910-003, then after i applied the code they became the current date 073010-001, 073010-002, 073010-003 instead of my records date. i want to make the doc no be save, so that when i add records tomorrow, it must be different date. my old record Doc no must not affected. Hope u understand now. pls. help me


我认为 = Date()& " - " &安培;格式([ID],000)是将值分配给该列的好方法。


我不知道为什么你的旧记录会更新到当前日期,除非你运行的更新查询以某种方式对表中的所有记录起作用。


Pat
I think =Date() & "-" & Format([ID],"000") is a good way to assign the value to that column.

I''m not sure why your old records would update to the current date, unless you are running an update query that somehow acts on all the records in the table.

Pat


这篇关于072610-002,日期和时间的组合ID,日期格式为mmddyy。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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