Results 1 to 5 of 5
  1. #1
    abhudd47 is offline Novice
    Windows 10 Access 2019
    Join Date
    Jan 2024
    Posts
    1

    Duplicate Record

    I am an administrative assistant. I use an Access database to track incoming and outgoing calls. (Incoming Calls is one table/form, Outgoing Calls is another.) I want to set it up so that, when I return a call, I can duplicate the incoming call form into the outgoing call form. What I'd really like to do is set it up so that double-clicking the phone number in the incoming call form creates a new record in the outgoing call forms with the name, contact information, and "regarding" fields automatically copied. I'm fairly new to using macros and everything, so might need to talk to me like I'm a moron. But I catch on quick. (Not all Outgoing calls will be in response to incoming calls, so simply having all new outgoing call forms reference the incoming calls table won't work...) Sorry if I sound like a novice. I used to be extremely proficient in Access, but that was back in 2004-2008. Things have changed a bit, and I've grown rusty.

    Thanks for any help!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    build an append query to copy the current record, and add field info you need, on the dbl-click event

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    I would just have one table with a field for incoming/Outgoing status.
    Then you could just add record and populate it with whatever data you want from the incoming call.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I also think one table is likely preferable.

    Whether one table or two, method to duplicate date from a record would be basically same. And there is more than one way to do it. With SQL in VBA, would be like:

    CurrentDb.Execute "INSERT INTO [tablename] (field1, field2, field3) SELECT field1, field2, field3 FROM [tablename] WHERE ID = " & Me.tbxID

    Use your actual table and field names - second tablename can be same table or another.

    Tricky part is figuring out what event to use - button Click or form Double-Click are two possibilities.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    madpiet is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Feb 2023
    Posts
    154
    Quote Originally Posted by Welshgasman View Post
    I would just have one table with a field for incoming/Outgoing status.
    Then you could just add record and populate it with whatever data you want from the incoming call.
    I like buttons, and then I usually add a step to check "Are you sure?" because I don't want people to be duplicating stuff by accident.

    dim bytResponse as byte
    bytResponse = MessageBox("are you sure?", vbYesNo)
    if bytResponse = vbYes then
    'do whatever
    end if

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

Similar Threads

  1. Replies: 9
    Last Post: 10-28-2020, 06:01 PM
  2. Replies: 1
    Last Post: 04-23-2019, 12:44 PM
  3. Replies: 2
    Last Post: 02-28-2019, 03:49 PM
  4. Replies: 7
    Last Post: 01-04-2018, 06:35 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