Results 1 to 2 of 2
  1. #1
    msp4422 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2013
    Posts
    7

    Duplicate current record & Increment a non Primary ID column to CurrMax+1 value

    Hi



    I would like to know if we have a simple method to duplicate the current record in a form and Increment a ID value to Current Maximum Value + 1 , and to clear few boxes so that user can enter new data in this form.

    I used Duplicate button but it copies entire data and I am unable to get a way to Update ID value to Max+1 and few date fields to NULL automatically.

    Could anyone suggest on this??

    Many Thanks.

  2. #2
    msp4422 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Feb 2013
    Posts
    7
    Private Sub Command106_Click()
    On Error GoTo Err_Command106_Click


    DoCmd.RunCommand acCmdSelectRecord
    DoCmd.RunCommand acCmdCopy
    DoCmd.RunCommand acCmdRecordsGoToNew
    DoCmd.RunCommand acCmdSelectRecord
    DoCmd.RunCommand acCmdPaste


    Me.[OII Receipt Date] = Null
    Me.[Initial Execution Date] = Null


    .
    .
    .
    .


    Thanks everyone for their time
    Have a cheerful day

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 16
    Last Post: 02-06-2013, 03:06 PM
  2. Replies: 5
    Last Post: 08-24-2012, 10:32 AM
  3. Increment the Primary Key from Excel
    By Philosophaie in forum Programming
    Replies: 8
    Last Post: 08-22-2012, 05:03 PM
  4. Replies: 4
    Last Post: 05-07-2012, 12:08 PM
  5. Set Current Record based on Primary Key Input
    By andersonEE in forum Forms
    Replies: 2
    Last Post: 06-24-2011, 08:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums