Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2007
    Posts
    11

    Unanswered: Creating field in table from data in other fields

    Can I create a field in an Access db table from data in other fields in the same table without coding? I think I can use expression builder but am stuck, maybe it cannot be done. Thanks

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    What do you mean? Can you give an example?
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Jan 2007
    Posts
    11
    I have say 4 fields in a table with data in them; let's say all text. I would like to create a field that automatically is populated with the data of all 4. Ex: 4 fields = a, bb, ccc, dddd. I would like a field that automatically gets filled with "a bb ccc dddd". I guess I could do it in the form since it is for display purposes only for the data input person. But I don't know how yet to create such a "display field" made up of the data in these other fields.

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    set the data to [field1] & [field2] & [field3] & [field4]
    probably best to do this as a function in the form mind you... that way round as the customer changes any of the 4 values its automatically propogated

    function concatentedata() as string
    concatentedata = [field1] & " " & [field2] & " " & [field3] & " " & [field4]
    exit function

    then call that fucntion in each of the following events
    form.??????? 'forget the name of this event could be reload, refresh or what ever
    field1.onchange field1.lostfocus
    ....ant the same for fields2,3, & 4

    make sure the target control is locked so that the user cannot put values in it
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Jan 2007
    Posts
    11

    thanks, but are you writing code here?

    Thanks for your time to help me. But I think your answer is code that someone would write, and i do not know how to write code for this stuff, only how to use, and to a limited extent, the "automatic" functions of Access, "expression builder, wizards, design view, etc). If this is not 'code" where would I put all of this? Do I just create a "field" in the table and use a query to get the info from the other fields? Sorry, I am pretty much a "novice intermediate" at this.
    Thanks

Posting Permissions

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