dates not masked in table (1 Viewer)

revlisj

Registered User.
Local time
Today, 10:55
Joined
Jun 11, 2013
Messages
29
Hi, I applied a "password" input mask to a date field in a table, but the date value remains visible. The password mask works fine for text fields. Text values display as ***** when viewed in datasheet mode. Dates, on the other hand, display as asterisks as you are typing in a value, but as soon as you leave the field, the value displays, as if unmasked.

Cheers
 

MarkK

bit cruncher
Local time
Today, 07:55
Joined
Mar 17, 2004
Messages
8,178
Make sure the InputMask property of the textbox that displays the date is also set to Password.
hth
Mark
 

revlisj

Registered User.
Local time
Today, 10:55
Joined
Jun 11, 2013
Messages
29
Thanks MarkK, but there is no text box displaying the date. I'm referring to the table datasheet view, not a form view. While entering a "password" masked date in the table, not a form, the asterisks appear as you type. But, as soon as you leave field, the date appears, unmasked. The same date field also shows up unmasked in a query built over said table.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 10:55
Joined
Feb 19, 2002
Messages
42,970
1. Data entry/update is NEVER, EVER performed directly by opening a table or query. Always create a form and use that. The form provides events you can use to run code and validate data.
2. Sounds like the Password mask is intended to be used for text data. I think what you are seeing is happening because of the three buffers Access provides for each control
.Text - buffer were data is entered. This would always be variant or text as a data type
.Value - the buffer that holds data after it is entered and before it is saved or for existing records, it shows data from the source table prior to its being changed.
.OldValue - the saved table value

When you finish entering data in a control and move focus to some other control, the changed data is moved from the .text property to the .value property. The value property is the same data type as the data type of the column in the table that it is bound to. So in this case it would be a date rather than text and that is probably why the mask disappears.

What are you trying to do and why do you need to mask a date? Do you really want the date to be hidden as you are typing? I have a form where the user needs to enter SSN. Since SSN is pretty sensitive when you combine it with other personal attributes. the form defaults to hiding the value and you have to press a button to show it. Would something like this work for you?
 

revlisj

Registered User.
Local time
Today, 10:55
Joined
Jun 11, 2013
Messages
29
Thanks Pat,

I'm not attempting to enter data directly into tables, just testing some scenarios. This all comes down to data security/protection. I have a number of tables with masked fields (sensitive data). I'm attempting to prevent users from opening a table in datasheet view (via navigation pane, F11) and seeing data they should not be seeing. Text fields see to work fine, date fields, not so much. I'm using forms and reports to unmask the masked table fields. This seems to be a hole in Access security.

Cheers
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 10:55
Joined
Feb 19, 2002
Messages
42,970
Masking isn't going to solve this problem. If your data is that sensitive, you should probably look at something other than Access as your FE. Even if you distribute an .accde, the users can still view the tables and then the data they contain. You can hide the tables and that makes it harder for the average user to locate. You can also set the database properties to prevent the use of the shift-bypass so the user won't be able to circumvent your opening form. But, if you have a competent hacker, nothing in Access is secure.
 

jumbotrano

Registered User.
Local time
Today, 07:55
Joined
Sep 6, 2017
Messages
12
Masking isn't going to solve this problem. If your data is that sensitive, you should probably look at something other than Access as your FE. Even if you distribute an .accde, the users can still view the tables and then the data they contain. You can hide the tables and that makes it harder for the average user to locate. You can also set the database properties to prevent the use of the shift-bypass so the user won't be able to circumvent your opening form. But, if you have a competent hacker, nothing in Access is secure.
True, with the right skills, access is kind of vulnerable
 

Users who are viewing this thread

Top Bottom