Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2015
    Location
    Winnipeg, Manitoba
    Posts
    3

    Unanswered: Add current record & create dulicate record with 1 change

    Hello everyone. I am glad I was able to find these forums however I have been unable to find the answer to this in any topic so far.

    I currently have a form that posts transactions to a table and I am looking for a way to so that when I am entering a transaction I can click a button I created so it will not only save the current record, but also create a second record within the same table that is identical except the TransactionType on the second record would be a value of 2 instead of 1 like the first record.

    Would anyone know how to do this?

    Thank you in advance for any help that is offered.

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Code:
    DoCmd.RunCommand acCmdSaveRecord
    DoCmd.RunCommand acCmdSelectRecord
    DoCmd.RunCommand acCmdCopy
    DoCmd.RunCommand acCmdPasteAppend
       
    Me.TransactionType = 2

    This assumes that TransactionType is Numeric. If it is defined as Text, the last line would be

    Me.TransactionType = "2"

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Mar 2015
    Location
    Winnipeg, Manitoba
    Posts
    3
    Thank you. Using what you provided with a few popup messages this works great.

Posting Permissions

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