View Full Version : Automatically populate a field from other fields


livin4rocknroll
07-27-2004, 08:18 PM
My company uses an ID system that works like this: It takes the first 3 letters of the first and last names and puts them together and then it takes the birthdate and adds it to the end. I was wondering if it was possible for the database to do this automatically From a form. Here is an example of my table the UniqueID column is what I need automatically generated from the other fields. Is this feasible?

| LastName | FirstName | UniqueID | BirthDate |
Cuervo Jose joscue020380 02/03/1980

Mile-O
07-28-2004, 01:22 AM
You don't store calculated fields in database table meaning that you can dispense with the UniqueID field.

Simply calculate this field in a query:

UniqueID: Left([FirstName], 3) & Left([LastName], 3) & Format(BirthDate, "ddmmyy")