Results 1 to 4 of 4

Thread: Assign a value

  1. #1
    Join Date
    Oct 2003
    Posts
    4

    Unanswered: Assign a value

    Can anyone tell me how to assign/input a region name into a table column based on the values in another column in the same table? Column A has numeric values such as 1,2, and 3 and I need to assign regions such as Western, Eastern, and Northern in column B.

  2. #2
    Join Date
    Nov 2003
    Location
    LONDON
    Posts
    238

    Re: Assign a value

    Originally posted by i78040
    Can anyone tell me how to assign/input a region name into a table column based on the values in another column in the same table? Column A has numeric values such as 1,2, and 3 and I need to assign regions such as Western, Eastern, and Northern in column B.
    You could use a combo box and a lookup table. You create a lookup table of regions and region id (your numeric value). In your main table you have a region id column which is displayed as a combo box in your table or form. The combo box displays the region name and not the id - provided you set the properties correctly. You could also set a relationship, if one exists between the region and main table

  3. #3
    Join Date
    Oct 2003
    Posts
    4

    Cool Re: Assign a value

    Originally posted by justin_tighe
    You could use a combo box and a lookup table. You create a lookup table of regions and region id (your numeric value). In your main table you have a region id column which is displayed as a combo box in your table or form. The combo box displays the region name and not the id - provided you set the properties correctly. You could also set a relationship, if one exists between the region and main table
    Thanks. Guess I am looking to code it with an if then statement. Any suggestions on that or a Dlookup?

  4. #4
    Join Date
    Nov 2003
    Location
    LONDON
    Posts
    238

    Re: Assign a value

    Originally posted by i78040
    Thanks. Guess I am looking to code it with an if then statement. Any suggestions on that or a Dlookup?
    You don't need any code as it is table driven. In your table with the region id you can set the column as a lookup column that uses your region table. Whenever you add this column to a form it will be created as combo box with all the settings you have made eg 2 columns and a column width of 0 cm,10 cm (this hides the first column - the ID and only displays the region name

Posting Permissions

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