Results 1 to 4 of 4
  1. #1
    Back2Basics is offline Novice
    Windows 2K Access 2003
    Join Date
    Feb 2010
    Posts
    28

    Add record based on other record


    Hi

    is it possible to create a new record based on the information on an existing record?

    I would hope to do this from a form view - as an example, I would be hoping to create a new invoice based on a previous invoice. So if you search a previous invoice, then I would hope for a button that would then create a new record with some of the fields completed using the current record details - such as customer name, customer address etc. Nothing too specific, but a few things that would mean you didn't have to input everything all over again.

    Possible example below:
    Existing Record

    Customer ID Customer Name Customer Address Customer Phone number Items Cost
    105 J. Edwards 32 Wallaby Way 01234 567810 Product 1 £350.00
    New Record
    Customer ID Customer Name Customer Address Customer Phone number Items Cost
    105 J. Edwards 32 Wallaby Way 01234 567810

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Yes, this can be done with VBA code. However, should not be duplicating the customer info into every order record.
    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.

  3. #3
    Back2Basics is offline Novice
    Windows 2K Access 2003
    Join Date
    Feb 2010
    Posts
    28
    Hi June

    Thanks for the message. Do you have a link which would help me find the VBA code I need?
    And what could I do instead of duplicating customer info?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Only the Customer ID should be saved into invoice records. Select customer from a combobox dropdown list.
    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.

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

Similar Threads

  1. Updating Multiple Record Form Based on Record Count
    By William McKinley in forum Forms
    Replies: 2
    Last Post: 12-31-2014, 12:45 PM
  2. Replies: 2
    Last Post: 09-23-2014, 02:15 PM
  3. Replies: 8
    Last Post: 07-06-2013, 05:13 PM
  4. Replies: 1
    Last Post: 04-24-2012, 02:36 PM
  5. Add Record based on related value
    By top1hat19 in forum Access
    Replies: 0
    Last Post: 03-08-2011, 12:45 PM

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