Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2006
    Posts
    162

    Unanswered: Equation in a table field.

    I want to make on field out of 3 using an expresion.
    I have three fields with numbers in them like so.


    F1 F2 F3
    1 1 3
    1 1 4
    1 2 25
    22 54 8

    This is a small example.
    I want to combine these into one field to show like this

    1.1.3
    1.1.4
    1.2.25
    22.54.8

    Then i'm gonna make that my primary field.

    What would be the formula i would use?

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    If you're doing it on a form, you'd put in somewhere: me!MyUniqueField = me!F1 & "." & me!F2 & "." & me!F3. The question would be where you'd put this in (i.e. after which event on which field(s)). Do you need the periods? Seems a little wierd for a primary key.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Sep 2006
    Posts
    162
    Thanks bro, its a location on a grid.

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    does a compound primary key do the job?
    saves the calculation step and no need to store a calculated value in the table

    izy
    Last edited by izyrider; 02-05-08 at 14:24.
    currently using SS 2008R2

Posting Permissions

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