INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Concatenate fields on form and write back to table

Concatenate fields on form and write back to table

(OP)
Hello,

I seem to be beating my head against the wall on something I should know and something I know I've done before. I have a form that takes text box A and concatenates text box B to create text box C. I have the correct concatenation string showing up on the form so i know it's putting together the data right. Now, how do I take that information in the text box C and write back to the table? I currently have the record source as a query that just looks at my master table.

Would I have to add these new records to a temp table and use an update query to write these back to the master table? Isn't there an easier way?

RE: Concatenate fields on form and write back to table

Why do you want to store a value that can be calculated on the fly? This isn't typically good practice.

However, you can set the control source of text box C to the field in your table and use a little code in the after update events of txtA and txtB to set the value:

CODE --> vba

Me.txtC = Me.txtA & Me.txtB 

Duane
Hook'D on Access
MS Access MVP

RE: Concatenate fields on form and write back to table

(OP)
Actually... now that you've talked it out, I'm not sure why i done it that way either. What I ended up doing was taking the data and storing it in a temp table and then append all of the records (including the concatenated field) to a master table. I know that is highly inefficient but it worked in a pinch.

I found out later than the DB requester is just dumping the data from Access to Excel anyways so I could have done the concatenation on the fly. Thanks for the tip though. It would have been much easier to do it on the fly.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close