M
Monty
Wow, I don't know what happened on that last post (11 copies made), so
I'll repeat it here:
My intention is to sift through records that may contain duplicate
entries in Field1 OR Field2, but not both. The two fields combined
will form a unique 'key', so to speak. So there can be duplicate
values in Field1 and again in Field2, but not for the same record.
The comparison values come from a form not attached to a table: it's a
user entry form for adding new records to the DB.
I'm hearing a couple of things, and one of them leads me to believe I
can possibly use a DCount thusly:
intResult = DCount("[Field1]", "MyDB", "[Field1] = ' " & Me.Control1 &
" ' AND [Field2] = ' " & Me.Control2 & " ' ")
If the function returns non-zero then a record containing both of
those values exists (I hope I have that right), which is all I really
need to know. I can write error routines based on that.
Do I have that correct?
I'll repeat it here:
My intention is to sift through records that may contain duplicate
entries in Field1 OR Field2, but not both. The two fields combined
will form a unique 'key', so to speak. So there can be duplicate
values in Field1 and again in Field2, but not for the same record.
The comparison values come from a form not attached to a table: it's a
user entry form for adding new records to the DB.
I'm hearing a couple of things, and one of them leads me to believe I
can possibly use a DCount thusly:
intResult = DCount("[Field1]", "MyDB", "[Field1] = ' " & Me.Control1 &
" ' AND [Field2] = ' " & Me.Control2 & " ' ")
If the function returns non-zero then a record containing both of
those values exists (I hope I have that right), which is all I really
need to know. I can write error routines based on that.
Do I have that correct?