L
Lee
Hi all,
Can you tell me what I'm getting wrong in the code below.
I'm trying to prevent duplicate values where the RowID AND
the Number are the same. eg...
RowID Number
2 2
2 15
2 19
2 28
2 32
2 48
3 2 (OK as RowID different)
3 17
3 27
3 27 (NOT ALLOWED)
Here's my code:
If DCount("[Number]", "tbl_OurLottery", "Number= '" & Me.
Number & "' And RowID = & Me.RowID") > 1 Then blah blah
The above is under the 'Before Update' event of a subform.
I hope you can help.
Thanks as always
Lee
Can you tell me what I'm getting wrong in the code below.
I'm trying to prevent duplicate values where the RowID AND
the Number are the same. eg...
RowID Number
2 2
2 15
2 19
2 28
2 32
2 48
3 2 (OK as RowID different)
3 17
3 27
3 27 (NOT ALLOWED)
Here's my code:
If DCount("[Number]", "tbl_OurLottery", "Number= '" & Me.
Number & "' And RowID = & Me.RowID") > 1 Then blah blah
The above is under the 'Before Update' event of a subform.
I hope you can help.
Thanks as always
Lee