Results 1 to 9 of 9
  1. #1
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117

    Query to make copy of form and record

    Hi guys, I know I have been posting a lot because trying to get things done before Christmas. But thanks for all the help so far!

    I would like to make a query that will be linked to a button on a form, that when clicked will create a copy of the form in a new tab or same tab but show up as another record in the table with the same information. But the only field that changes is the revisions field which default value is 0. I would like this field to add 1, so it would go from 0 to 1, then if revised again, it would go to 2, creating another record in the table. Then there is another field in called test status which is a drop down which value is "Final". I would like this to go to the value "Draft." So basically user clicks the button and it creates the same form all same information but the revision field goes up by one number and the test status goes to draft, which creates a new record in the table the fields are linked too.



    Thanks!

  2. #2
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117
    I think I figured out the first step, I made an append query for the table to create a copy of the record, but how do I do the revision part and test status part? Thanks

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Your append query can have hard-coded values for a field. Put "Draft" in there.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117
    how about the revision field, and do I just put "Draft" in the criteria field? Thanks!

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    You can do it with any of the fields, and the value would go in the Field row. Access will add an alias, so it will look like:

    Expr1: "Draft"

    In an append query the alias is never shown to the user, but you can change it if you want.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117
    pbaldy how do I do this for draft field and update the revision field by adding 1 to it? how do I do the expr?

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Revision + 1
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117
    how do I type both the fields in the query, sorry I need step by step, where do I first put the "expr1" (the field name is Document Type) the table is called TR_Master, and the values for the document type I want it to default is "Draft". Where would I put all this in the query and how do I do the revision field and where do I type "Revision + 1" in the query. Thanks!

  9. #9
    banpreet is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    117
    anybody trying to give me a step by step, sorry im a noob at queries

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

Similar Threads

  1. Replies: 6
    Last Post: 02-26-2016, 05:28 AM
  2. Replies: 1
    Last Post: 07-23-2015, 10:18 PM
  3. Replies: 2
    Last Post: 09-17-2014, 04:55 PM
  4. Copy record into pop-up form
    By arothacker in forum Forms
    Replies: 5
    Last Post: 03-27-2014, 12:23 PM
  5. Replies: 3
    Last Post: 03-09-2013, 10:39 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