Input masks and (non) duplicate values

P

PeterC

I can get "no duplicates" to wotk fine on an indexed
field but if I then create and input mask for that field
then it is possible to put in duplicates.

Thanks for any help...
 
T

Tim Ferguson

I can get "no duplicates" to wotk fine on an indexed
field but if I then create and input mask for that field
then it is possible to put in duplicates.

Without testing, but... I don't believe it. Input masks are display
properties only and have no relation to the data model, unlike Unique
Indexes which are a central part of Data Integrity control. Masks do funny
things to hide the actual data in the field, and what look the same may in
fact be different values.

1) Try displaying the contents in a query without any formats or masks
enabled -- for a numeric, try something like SELECT FORMAT(MyNumber,"0.00")
AS MyPlainNumber, or for a text string SELECT "<" & MyTextString & ">" AS
MyPlainText, and so on.

2) Run a grouping query and ask it to show duplicated values:

SELECT MyNumber, COUNT(*) AS NumberOfThisNumber
FROM MyTable
GROUP BY MyNumber
HAVING COUNT(*) > 1
ORDER BY MyNumber

3) Remove the b****y input mask.

Hope that helps


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top