Results 1 to 3 of 3
  1. #1
    stu_C is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    38

    Copy form text box data to another record

    Hello
    If I want to copy the multiple field data details from the current record to a new record but only certain fields how do I do this using a button?

    TBLDetails
    Field1
    Field2
    Field3
    Field4

    the form fields are bound by the table
    TextBox1
    TextBox2
    TextBox3


    TextBox4

    I have 11 or so fields but would only like certain fields to be copied across when a command button is pressed

    Help with this would be greatly appreciated

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    Cross posted with responses at https://www.access-programmers.co.uk...d.php?t=307038
    Stu did you look at the Allen Browne materials suggested on the other forum??

    Stu,
    When you cross post, it is considered proper etiquette/netiquette to advise readers that you have done so.
    And to provide a link(s) to the other post(s).

    Here's why.

  3. #3
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,757
    Hi Stu

    You can use something along these lines

    ' add new record in tblName
    CurrentDb.Execute "INSERT INTO tblName ( Field1, Field2, Field3, Field4 ) " _
    & "Values ( " & Me!Field1 & ", " & Me!Field2 & ", " & Me!Field3 & ", '" & Me!Field4 & " );", dbFailOnError

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

Similar Threads

  1. Replies: 5
    Last Post: 10-18-2018, 03:41 PM
  2. Replies: 9
    Last Post: 07-11-2017, 07:51 AM
  3. Replies: 5
    Last Post: 02-21-2012, 07:33 AM
  4. Replies: 1
    Last Post: 07-23-2011, 11:51 PM
  5. Replies: 3
    Last Post: 07-23-2011, 12:45 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