View Full Version : Field Format/Input Mask Problem


MonkeyGirl
07-10-2003, 11:56 AM
Hello!
I recently took over managing an Access database at work. It was designed simple as its purpose is to log and track certain incidents in daily operations. Each incident is given an unique identifier. The format mask is: &&&"-K03";;
The problem is, the year is half over and we're approaching # 1000 real quick. I've tried to change the format to allow the fourth digit, but the field is a text data type and it sorts as text (so that 1000 immediately follows 100). I've tried to manually enter a leading "0" as a placeholder, but the relationships won't allow that.
This is driving me absolutely nuts and I've had to put the data entry on hold until I can figure out a solution.
Thank you in advance!!

Pat Hartman
07-10-2003, 12:16 PM
In the future do not use this type of field as your primary key. Use an autonumber or something that you won't have to change. OK, lecture over.

In the relationships window, open the relationships, one at a time and make sure that enforce referential integrity is checked. Once RI is checked, you will have the option to select Cascade Update - do it. This will allow you to change the value of a primary key and have its new value "cascaded" to the related child table. If there are many relationships to this pk, they will all need to be changed to allow cascade update before Access will let you change the pk value.

Create an update query that inserts a leading zero.

Change the edit mask.