By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,308 Members | 1,155 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,308 IT Pros & Developers. It's quick & easy.

Transfer field text to alternate field text by clicking a button

P: 2

I would like to transfer information from multiple fields to other similar fields in the same form by clicking one button.

For example... when shipping address is similar to billing address. I don't want to copy paste each field from one field to the other. I would like a button that says "Same as Shipping" and the billing fields are filled with the same info as the shipping fields.

I would like to do this from a form view.

Mar 26 '10 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 15k+
P: 31,770
Do you want a CheckBox on your form to reflect this choice, whereby the code would use the same data when it goes to process it instead of looking in the Billing Address controls, or would you prefer a Command Button that triggers code to make duplicates in the Billing Address controls at that point in time?

PS. We generally insist that you show us what you've done so far before providing boilerplate code. We are happy to assist, but we do not want to be confused with people who simply do it for you.

PS. I really like your member ID. Nice choice :D

PPS. Welcome to Bytes!
Mar 26 '10 #2

P: 2
I am looking for a command button that will copy the fields to other fields.
Mar 29 '10 #3

Expert Mod 15k+
P: 31,770
The code behind such a button would be of a form similar to :
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdButton_Click()
  2.     With Me
  3.         .txtBilling1 = .Shipping1
  4.         .txtBilling2 = .Shipping2
  5.         ...
  6.     End With
  7. End Sub
Mar 29 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.