Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy/Paste from one bound text Box to another 1

Status
Not open for further replies.

Pistol

MIS
Jan 29, 2001
59
US
I have a form containing: Name, address, city, state, et cetera (for "SoldTo" information). If the "ShipTo" information is the same as the "SoldTo" I would like to copy the "SoldTo" fields and paste them into the "ShipTo" fields. This way the user would not have to enter the same information twice.

I have tried using a macro to do this (using "SetValue"), but it will not work. I have tried building an expression, but I am not very familiar with it. I have also tried with code, but cannot get that to work. I've pasted the code below for you to look at:

***********************************************
Private Sub CmdCopy_Click()
DoCmd.GoToRecord "SoldToCustomerName"
DoCmd.RunCommand acCmdCopy
DoCmd.GoToRecord "ShipToCustomerName"
DoCmd.RunCommand acCmdPaste
End Sub
***********************************************
I am also using Access 2000

Thanks in Advance
 
Hi!

Private Sub CmdCopy_Click()
me.ShipToCustomerName = me.SoldToCustomerName
End Sub

Aivars

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top