A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Input masks and (non) duplicate values



 
 
Thread Tools Display Modes
  #1  
Old June 10th, 2004, 05:53 PM
PeterC
external usenet poster
 
Posts: n/a
Default Input masks and (non) duplicate values

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...
  #2  
Old June 10th, 2004, 09:59 PM
Tim Ferguson
external usenet poster
 
Posts: n/a
Default Input masks and (non) duplicate values

"PeterC" wrote in
:

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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.