Results 1 to 2 of 2
  1. #1
    britt britt is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    3

    Red face Auto generate value with values from 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.

    Example:

    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
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    Using this convention is ok in its self however, what would happen if the person changes their name. What you would be better of doing is adding a autonumber field to tyhe table and use this as the primary key. but to answer your question you can use the code

    X = Left(Surname,3) & Left(forename,3)

    Also what happens if the person is call Ng Li ?

    David

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 09-10-2009, 05:42 AM
  2. Setting default values in columns
    By crownedzero in forum Programming
    Replies: 0
    Last Post: 06-17-2009, 06:45 AM
  3. Replies: 9
    Last Post: 04-28-2009, 05:42 PM
  4. Generate Image
    By dbman in forum Import/Export Data
    Replies: 0
    Last Post: 01-31-2008, 10:46 PM
  5. Replies: 1
    Last Post: 03-11-2006, 07:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums