识别重复条目 - Access上的值范围 [英] Identify duplicate entry - range of values on Access

查看:56
本文介绍了识别重复条目 - Access上的值范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,




我有一个表格,我们需要输入初始和作业的最终序列,我们希望避免在相同范围的值上重复输入。例如:

I have a form where we need to entry the initial and final sequence of a job and we want to avoid duplicate entries on the same range of values. For example:

如果有人从#1到#1500捕获作业的序列,之后有人试图从同一作业的序列#900到1500捕获它,它会显示一条消息比如'重复工作'并且不允许保存条目。

if someone capture the sequences of a job from # 1 to # 1500 and later someone tries to capture from the sequence # 900 to 1500 of the same job, it shows a message like 'Duplicate job" and does not allows to saving the entry.

可能吗?

谢谢,

Santiago Z。

Santiago Z.

推荐答案

你想知道这两个范围是否有重复值吗?

Do you want to know if the two ranges have duplicate values?

我认为你可以向数组添加两个范围值然后使用Linq。

I think you can add two range values to the array and then use Linq.

 Public Function compareArr(ByVal arr1 As Integer(), ByVal arr2 As Integer()) As Boolean
        Dim q = From a In arr1 Join b In arr2 On a Equals b Select a
        Dim flag As Boolean = arr1.Length = arr2.Length AndAlso q.Count() = arr1.Length
        Return flag
    End Function

最诚挚的问候,

Alex


这篇关于识别重复条目 - Access上的值范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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