Results 1 to 2 of 2
  1. #1

    Copying across data from one field to another ...

    Hi All

    I'm trying to copy across data between fields on a form when I click a button. The code I'm using is:

    Private Sub butCopyDetails_Click()
    corAddress1 = address1
    corAddress2 = address2
    corAddress3 = address3
    corTown = town
    corPostCode = postcode
    corTel = tel
    corFax = fax
    corEmail = email
    corwww = www
    End Sub

    It works ... partly ... but for some reason it only shows the data in the new fields once I've moved onto a new record and then moved back again. Is there anyway I can solve this e.g. by adding in code that refreshes the fields straight away? I'm confused!


  2. #2
    New Lounger
    Join Date
    Jan 2001
    Thanked 0 Times in 0 Posts

    Re: Copying across data from one field to another ...

    Yes, Kenny. Look in Help for Refresh, Requery and Repaint. You place them before the End Sub. It would look something like this:

    corwww = www
    End Sub

    You may have to play with it a little, but it should work. (Of course, Charlotte probably has a better way. <img src=/S/heart.gif border=0 alt=heart width=15 height=15>)

Posting Permissions

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