Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2009

    Unanswered: Auto Generate value from values in other columns

    Hello everyone!

    So I'm new to the whole database world and although I'm a quick learner, things are going really slow for me. I don't have anyone in my office that has ever used Access before and I'm trying to teach myself so any help you can offer would be aprpeciated.

    I'm working on a database for tracking two sets of contacts and possibly linking them together. I live in the Seattle area and this winter they are predicting major flooding through the Kent/Auburn Valley - possibly similar to the Hurricane Katrina event a few years ago. I am hoping to start heading up an organization effort to connect families living in the valley with families living on the hills so that in the event of a flood they would have a place to stay for a few weeks/months while they are rebuilding.

    Just wanted to give you a background on what I"m doing.
    Sorry posted this in the wrong thread earlier!

    I'm working with Access 2007.

    My main question is... is there a way to auto generate a value in a cell based on a combination of values from another column on the same table.


    I want the cell in the Family ID to autogenerate with the first three letter of the person's Last Name (found in the Last Name Column) and the first three letters of the person's First Name (found in the First Name Column)

    I know in Excell I can do it with a VLOOKUP formula... any ideas on how to do it in Access?

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 15
    You could try something like this:
    FamilyID = Left(LastName, 3) & Left(FirstName, 3)
    If there is a possibility for LastName and/or FirstName to be Null (Null allowed in those columns), then:
    FamilyID = Left(Nz(LastName, ""), 3) & Left(Nz(FirstName, ""), 3)
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts