aria Posted August 10, 2009 Posted August 10, 2009 Hi all, We have a table called FMRI There are two fields that we would like to set as semi unique value: 1.Subj_num 2. FM_subj_num For both fields I setup Validation “Not empty” What we like to do is, prevent users from creating duplicated record with the following fields: subj_num and FM_Subj_num . Such as: In ideal situation we would like it such as: Record 1: subj_num = 2 and FM_SUBJ_NUM = 3 Record 2: Subj_num = 10 and FM_subj_num = 3 But if users create two records like this then inform users that there is a duplicated subj_num and FM_subj_num already exist in database: Record 1: subj_num = 10 FM_SUBJ_NUM = 3 Record 2: Subj_num = 10 FM_subj_num = 3 Please advise, Thanks in advance, Abrahim
comment Posted August 10, 2009 Posted August 10, 2009 You could define a third field of type Text and set it to auto-enter (replacing existing value) a calculated value = Subj_num & "|" & FM_subj_num Set the field's validation to Unique, Validate always.
aria Posted August 11, 2009 Author Posted August 11, 2009 Hi there, I did set new field called GFM_Num type Text and set it to auto-enter (replacing existing value) a calculated value = Subj_num & "|" & FM_subj_num Set the field's validation to Unique, Validate always. Now when I go enter some data in Subj_num field and leave the feild, I get the following error: “Subj_Num” is defined to contain existing value only. You must enter one of the existing values. Any idea? Thanks, A
aria Posted August 11, 2009 Author Posted August 11, 2009 Never mind. The existing value was selected so I just deselect it. All is working well!!! Thanks, A
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now