Home Code VBA: Format a date field in MS Access

VBA: Format a date field in MS Access


There are a ton of ways you can do this, but one of the easiest is to simply save the field with all the numerals for the date into a “Date” format under the Table field properties.  But before you do that, you have to add some formatting so that Access 97 recognizes it as a date and doesn’t throw them all out as invalid.

Here is a simple code: Mid([tblName]![DOB],1,4)+”/”+Mid([tblName]![DOB],5,2)+”/”+Mid([tblName]![DOB],7,2)

Previous articleError uploading Screen Movie Studio video file to YouTube
Next articleLorton Data – Duplicate address processing tips


Please enter your comment!
Please enter your name here