尝试根据另一个日期字段将日期字段设置为自动填充 [英] Trying to set a date field to autofill based on a another date field

查看:63
本文介绍了尝试根据另一个日期字段将日期字段设置为自动填充的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我正在尝试根据另一个日期字段的日期获取自动填充的日期字段。我希望自动填充日期是在另一个日期之后的30天。例如,如果用户在第一个日期字段中输入了06/15,我希望第二个字段自动填充7/15。我已经尝试了一切我无法想到的东西!我无法想象这是一件很难的事情........


任何人有什么想法吗?

解决方案

假设您的2个日期字段是[Date1]和[Date2],在[Date1]的AfterUpdate()事件中,请输入以下代码。完成后,它应该如下所示:

展开 | 选择 | Wrap | 行号


在datefield1的更新后事件中输入以下代码......

展开 | 选择 | Wrap | 行号


哈哈!卡扣

Hello,

I am trying to get a date field to autofill based on the date of another date field. I want the autofilled date to be 30 days after the other date. For example, if the user has entered 06/15 in the first date field, I want the second field to automatically populate with 7/15. I have tried everything I can think of to no avail! I can''t imagine this is a difficult thing to do........

Anyone have any ideas?

解决方案

Assuming your 2 Date Fields are [Date1] and [Date2], in the AfterUpdate() Event of [Date1], place the following code. When finished, it should look like:

Expand|Select|Wrap|Line Numbers


In the after update event of datefield1 put the following code ...

Expand|Select|Wrap|Line Numbers


LOL! Snap


这篇关于尝试根据另一个日期字段将日期字段设置为自动填充的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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