Results 1 to 2 of 2
  1. #1
    Trojnfn is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    46

    Field concatenation

    I have a field named dimensions in my table and it should contain something like 10x10x10 ft., for example.

    In my form, I don't want to display the dimensions field and have users type in 10x10x10 ft. I want to break it up into four different fields. For example, it will display something like this :

    __L x __W x __ H __(pulldown for ft. or inches).



    So the user will know to enter the lenght, then witdh, then height, then pick whether it is ft. or in. But when I write to the table, I want to concatenate everything and store it as 10x10x10 ft.

    How can this be done ?

  2. #2
    pdebaets is offline Competent Performer
    Windows Vista Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Los Angeles
    Posts
    235
    First, of all, you should store the data as 4 separate fields in your table. This will make it easier to bring the data up on a form for editing, as you won't have to convert it back and forth.

    To concatenate the fields, simply create a query based on your table and add a new field to the query which concatenates the fields together. If your table is named "BuildingSpecs", then I suggest you name your query "qryBuildingSpecs".

    Add a field to the query that looks something like this:

    Dimensions: MyLengthField & "x" & MyWidthField & "x" & MyHeightField & " " & MyUnitsField

    Now you can use the query as the record source for a form or report, and you can include the Dimensions field as a read-only control.

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

Similar Threads

  1. Query and Concatenation
    By Try2Live4God in forum Programming
    Replies: 2
    Last Post: 05-25-2010, 03:45 PM
  2. Concatenation of Text and Number
    By diane802 in forum Reports
    Replies: 67
    Last Post: 01-26-2010, 03:37 PM
  3. Concatenation and IIF statements in report
    By bjsbrown in forum Reports
    Replies: 20
    Last Post: 10-19-2009, 10:00 AM
  4. Concatenation Urgent Help
    By Shoaib in forum Queries
    Replies: 0
    Last Post: 04-23-2009, 11:02 PM
  5. Concatenation, nested IIF functions
    By krymer in forum Queries
    Replies: 2
    Last Post: 10-20-2008, 07:27 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