Results 1 to 2 of 2
  1. #1
    alyon is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2011
    Posts
    89

    Duplicate Record without Changing Textbox

    Is it possible to duplicate a record, and stop the default value of one textbox changing to the duplicate record's textbox value?
    For example:


    Permit Number:
    Name:
    Address:
    copy the name and address but not the permit number.

  2. #2
    alyon is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2011
    Posts
    89
    I got it, incase anyone else is wondering how to go about it,
    Create a command button with this code:
    Dim txtInspection As Integer
    txtInspection = Me.txtInspection

    DoCmd.RunCommand acCmdSelectRecord
    DoCmd.RunCommand acCmdCopy
    DoCmd.RunCommand acCmdPasteAppend

    Me.txtInspection = DMax("[Inspection #]", "[Enter Inspection]") + 1

    Exit_CopyRecord:
    Exit Sub


    **txtInspection is the textbox you don't want to be copied.
    **Enter Inspection is your table name.

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

Similar Threads

  1. Duplicate last record to next record in form
    By jdhaldane in forum Forms
    Replies: 4
    Last Post: 12-17-2010, 04:22 PM
  2. If duplicate record, go to original record
    By BigBear in forum Forms
    Replies: 2
    Last Post: 10-06-2010, 02:58 AM
  3. Duplicate a Record
    By AKQTS in forum Forms
    Replies: 11
    Last Post: 08-09-2010, 05:25 PM
  4. If duplicate record, go to original record
    By islandboy in forum Access
    Replies: 51
    Last Post: 06-02-2010, 04:17 PM
  5. Changing the record source in a form
    By lmichaud in forum Forms
    Replies: 1
    Last Post: 07-09-2006, 09:20 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