Apply a format to the textbox where you display that number:
0000000000000
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi all,
I have a Access 206 database where student details are recorded. One of these fields, is an ID field which consists of 13 digits. The first 6 digits, is the birth date of the student. Typically, if the person was born on 31 May 1965, the first six digits would be "650531" ...
These six digits is used to complete the "Birth Date" field on the form as soon as the lost focus event is triggered.
My issue is that I never took into consideration when a person is born in or after 2000. So if the person is born on 31 May 2003, the first six digits of the ID is entered as "030531", but when the lost focus event is triggered, Access throws away the leading zero, truncating the field to "30531", which results in an error.
Any suggestions how I can change to accept the ID if a person is born in or after 2000?
Thanks
Deon
Apply a format to the textbox where you display that number:
0000000000000
Hi Gustav,
Applying a format does not work. I have changed the field property to be a "Short Text" field and it seems this solved the problem.
Thanks
Hi Gustav,
I have played around with your format suggestion. It will work to display the ID correctly on the screen, but when I save the ID, it is saved without the leading zero (201315555288)
Is there perhaps a way to save the ID including a leading zero (0201315555288)?
Thanks
Deon