Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2013
    Posts
    1

    Unanswered: storing concantenated text

    I have a form with several fields "doc type, doc discipline, doc location". A user will populate those fields with alpha characters. Then I have an unbound text field that concantenates all 3 of those fields. I want to store those results into a table. Everything I see states not to do that but I need it save that combined result somewhere.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    now you don't NEED to store that combined result, you WANT to...

    store it as 3 separte columns, you cna alwasy merge it as required alter on


    eg

    select [doc type] + ", " + [doc discipline] + ", " + [doc location] as myconatenatedstring from mytable



    but then again if you were following principles of realtional design you'd probably have a table for :-
    document types, with the PK of that table azs a FK in you current table.
    have a table for disciplines
    a table for locations

    each of those tabels would have its FK in your table, and you'd probably use a combo or list box to select the correct PK as the FK in your main table.


    if you must persist in your current design (and it will be a problem) thneb create a column in your table called say, mybastrdisedtabledesign
    set the row source of the current unbound control to be =mybastrdisedtabledesign
    then set the value of that control to be =[doc type] + ", " + [doc discipline] + ", " + [doc location].

    why do it the 'rogth' way
    well what happens if you want to edit the location
    or you want to search the location....


    doing it your way leaves your system wide open to problems through typos eg simple spelling mishtakes
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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