#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    5
    Rep Power
    0

    Copy Record Button that copies Selective fields only


    Copy Record Button that copies Selective fields only

    I am using Access 2000

    I am currently using the “Copy Record” function to copy a whole record within my Form.

    What I really want to do is only copy the same 5 fields each time and for the remaining fields to be empty and ready to enter information upon.



    Can I add to the “Copy Record” code in some way so that only selected fields are copied to the next entry rather than all fields?

    The Copy Record code is:
    Private Sub Command28_Click()
    On Error GoTo Err_Command28_Click


    DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
    DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
    DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
    StartPoint.SetFocus

    Exit_Command28_Click:
    Exit Sub

    Err_Command28_Click:
    MsgBox Err.Description
    Resume Exit_Command28_Click

    End Sub

    Thank you for any help

    Comments on this post

    • JimmyGosling agrees
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    5
    Rep Power
    0
    I have managed to solve this copy problem with this piece of code

    Private Sub SelectCopy_Click()
    DoCmd.GoToRecord , , acNewRec
    Combo56.SetFocus
    With Me.RecordsetClone
    .MoveLast
    Me.StudentsName = !StudentsName
    Me.Mark = !Mark
    Me.NumberofAppearance = !NumberofAppearance
    Me.Examiner = !Examiner
    Me.StudentLevel = !StudentLevel
    End With
    End Sub

IMN logo majestic logo threadwatch logo seochat tools logo