需要紧急帮助验证规则(日期间隔重叠) [英] Need Urgent Help With Validation Rules ( Date Intervals Overlap)

查看:56
本文介绍了需要紧急帮助验证规则(日期间隔重叠)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题只是:


我需要在通过子表单输入员工时验证StartDate和EndDate。目的是避免输入违反或重叠先前分配给特定员工的日期间隔的日期。

提前在各部门分配员工。

所以我需要避免间隔重叠,以便员工不会同时分配到两个部门。 />

感谢你的时间和帮助

Simply my problem is:

I need to validate the StartDate and EndDate when entered for an employee through subform. the purpose is to avoid entering a date that violate or overlap date intervalS that are previously assigned to a specific employee.
employees are assigned throughout the departments in advance.
So I need to avoid the overlap in intervals so that an employee is not assigned to two departments at the same time

Appreciating your time and help

推荐答案

彼得。


你可以看看这个主题,这似乎与您的情况完全一致。


问候,

Hi, Pyotr.

You may take a look at this thread, which seems to match exactly your situation.

Regards,
Fish


两个问题之间有一些相似之处,但根据我所理解的情况存在重大差异。在我的问题:


我有表格及其子表格


子表单根据表单中的部门名称进行过滤>

然后在子表单中输入员工姓名并输入他的开始和结束日期。


所以我只想验证输入到之前输入的日期的新日期,这些日期只与子表单中的员工姓名匹配。
There are some similarities between both problems, but there is main difference according to what I understood. In my problem:

I have form and its subform

The subform is filtered according to the Department Name that is in Form

and then in the subform you enter the name of the employee and enter his start and end date.

And SO I want only to validate the new dates entered to the previously entered dates that only matches the employee name in the subform.


I '有一个想法,可以变得很好


我已经进行了查询并在新字段中添加了一个表达式来比较建议的日期。到目前为止,我已经到了开始日期。


Expr1:[表格]![schedulingsub]![开始]之间[开始]和([结束] -1)


时我回到查询的正常视图,询问开始日期,然后我发现查询将所有间隔与输入的日期进行比较,如果满足条件,则在两个日期之间写入-1,如果不是它给了0.


我的问题是:我可以使用这个选项作为一个计数器,这样如果接近从Expr1中找到任何低于0的数字作为查找其总和或其他类似的东西然后它拒绝在子表单中输入日期。


我需要根据输入的名称过滤查询子表单,以便它可以验证或仅将日期与该员工的值进行比较。然后当我输入新员工的名字时,它再次启动相同的过程。


AnyWay,这只是一个需要帮助的想法


我相信这个问题有天才解决方案
I''ve got an idea, that can turn to be good

I have made a query and added an expression in a new field to compare the proposed date. I have made to the Start Date so far.

Expr1: [Forms]![schedulingsub]![Start] Between [Start] And ([End]-1)

when I return to the normal view of the query it asks for the Start Date and when then I find the query compared all the intervals with the entered date and if it meets the condition and it is between the two dates it writes -1 and if not it gives 0.

My question is: can I use this option as a counter so that if the "acess" finds any number below 0 from Expr1 as finding its sum or anything like that then it refuses entering the date in the subform.

I need the query to be filtered according to the name entered in the subform so that it is ready to validate or compare the date against the values for that employee only. and then when I enter the name of a new employee it starts the same process again.

AnyWay,, it is just an idea that needs help

And I am sure there is genius solution for this problem


这篇关于需要紧急帮助验证规则(日期间隔重叠)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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