Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2004
    Posts
    5

    Unanswered: Can anyone help?

    I have a table with 2 fields in it that I want to concatenate and auto populate a 3rd field in the table...ie;

    Table=Main Data
    Field 1 = RRH
    Field 2 = RRH VER
    Field 3 = RRH & RRH VER

    I am using a form to enter data, entering the RRH and RRH VER fields and have
    a control set on the Field 3 to concatenate Field 1 and Field 2 together. I can see the concatenate on the entry form but I cannot get the value to copy into the Field 3 on the table.

    Any suggestions? Also, I am a VB Dummy, I do know SQL though.

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Don't do that.

    That creates normalization issues. You should never duplicate data unless it's absolutely necessary. Anytime you need "field 3", do it in the recordsource or at the application level.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Sep 2004
    Posts
    5
    Didn't ask for advice not to do it.....I asked how to do it.

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    ProTip: If YOU can't think of a good reason to do it that way, there probably isn't one.

    You would be well advised to not let your pride get in the way of common sense design logic.

    But hey, I don't have time to argue with people over why they shouldn't ignore db design concepts 101, good luck to you!
    Last edited by Teddy; 09-28-04 at 14:38.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Mar 2004
    Posts
    42
    Teddy is right that is not a good DB design. But, if you want to save the data based on the concatenated string of Field1 and Field2, you can create a variable to hold that data then assign the value of the variable to Field3, or on your properties for default value of Field3 used the concatenated string as the value.

    HTH

    ESM

  6. #6
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Or the simplist way is to have a hidden column for your concatenation column that gets updated on the afterupdate event of the 2nd text box ...

    Private Sub Text2_AfterUpdate()
    Text3.Value=Text1.Value & "&&" & Text2.Value
    End Sub
    Back to Access ... ADO is not the way to go for speed ...

  7. #7
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    No no Owen, he wants to do this at the TABLE level, not the form. He's quite adamant about that.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  8. #8
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by Teddy
    No no Owen, he wants to do this at the TABLE level, not the form. He's quite adamant about that.
    Ted,

    I'm not quite sure about that ... The request seems a little ambiguous ... You are quite correct on the design aspects of his table ... And likewise, in Access THERE IS NO TABLE LEVEL mechanism for doing what he wants. As he's soon to find out, everything has to be done minimally at the query level ... Even esm said pretty much the same idea as mine ...
    Back to Access ... ADO is not the way to go for speed ...

  9. #9
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Oh I agree, that's the method I was trying to suggest. He simply isn't having any of it.

    I would suggest doing it in the query though.

    *shrug*
    Last edited by Teddy; 09-28-04 at 15:49.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  10. #10
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by Teddy
    Oh I agree, that's the method I was trying to suggest. He simply isn't having any of it.

    I would suggest doing it in the query though.

    *shrug*
    Like you said ... Oh FREAKING well ... You are a much nicer guy than I am ...
    Back to Access ... ADO is not the way to go for speed ...

Posting Permissions

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