访问日期功能 [英] Access date functionality
问题描述
我有以下要求
在表单中,存在需要自动填充的日期字段。日期必须是每周的星期五。假设在2月4日 - 2月11日的日历周中,如果用户在2月4日(星期日) - 2月9日(星期五)之间的任何时间打开数据输入表单,则数据字段应填充2月9日日期。如果用户在2月9日之后的任何时间打开表单,则日期字段应该填入下周的'星期五'的日期,即2月16日。
任何人都可以帮助我这个?
谢谢,
Shank
看看这个链接它可以帮助您满足您的需求。
>
例如,这里将返回最后一个星期天
展开 | 选择 | Wrap | 行号
以下是我为您制作的一些代码。有更好的方法来使用日期函数来实现这一点,但这也有效。你可以在On Form Load或On Current上做到这一点
祝你好运
展开 | 选择 | 换行 | 行号
尝试将控件的默认属性设置为:
展开 | 选择 | 换行 | 行号
Hi,
I have the following requirements
In a form, there exists a date field which needs to be automatically populated. The date has to be the Friday of every week. Assume in a calendar week Feb 4th - Feb 11th, if the user opens a form for data entry anytime between Feb 4th(Sunday) - Feb 9th (Friday), the data field should populate with Feb 9th date. If the user opens the form anytime after Feb 9th, the date field should populate with the next week''s friday''s date i.e. Feb 16th.
Can anyone pls help me with this?
Thanks,
Shank解决方案Take a look at this link it should help you with what you want.
For example this here will return the last sunday
Expand|Select|Wrap|Line Numbers
Here is some code I made for you. There are really better ways to make this with the date functions but this works too. You can do this on the On Form Load or On Current
Good luck
Expand|Select|Wrap|Line Numbers
Try setting Default property of the control to :
Expand|Select|Wrap|Line Numbers
这篇关于访问日期功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文登录 关闭
扫码关注1秒登录发送“验证码”获取 | 15天全站免登陆