Results 1 to 7 of 7
  1. #1
    lrfowler is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Feb 2011
    Posts
    31

    I would like to copy an existing invoice done in Access


    Hi....
    We have a program in Access that makes invoices. I am interested in copying one of the invoices to be used as a new invoice.....
    I have attached a screenshot.
    How do I add a 'copy' button?

    thanks,
    Larry
    Attached Thumbnails Attached Thumbnails invoice_capture.JPG  

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    It really depends on your table structure but if you're talking about taking the non - invoice specific information to a new invoice (everything but the invoice number and invoice date) you could likely run an insert query (look at append queries) based on the current invoice, just don't copy the invoice number and invoice date field to the new po (this is assuming your invoice number is an autonumber and will increment itself), the date you can set to a default of today's date and modify it if you need to.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Another approach is to set the DefaultProperty of controls you want data carried forward to another record in the same session. Code in the BeforeUpdate event of each control.

    Me.controlname.DefaultProperty = Me.controlname
    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.

  4. #4
    lrfowler is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Feb 2011
    Posts
    31

    I don't have a clue what to do...

    So we have ABC Hardware with their address and phone number, contact info...etc....
    I want all this info copied to a new invoice......
    So may be Copy and Paste buttons?

    Quote Originally Posted by June7 View Post
    Another approach is to set the DefaultProperty of controls you want data carried forward to another record in the same session. Code in the BeforeUpdate event of each control.

    Me.controlname.DefaultProperty = Me.controlname

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    You want to save that data into the Invoice record? That is duplicating data. Just save the CustomerID for ABC Hardware.

    Then in query join tables to retrieve related information for report output.

    If you want to just display the related information on form then options are:

    1. join the customer table to the invoice table in the form's RecordSource, join type 'Include all records from Invoices ..."
    then have textboxes bound to the customer info fields with property settings Locked to Yes, TabStop to No.

    2. Have a multi-column combox with all customer info. Textboxes reference columns of the combobox.
    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.

  6. #6
    lrfowler is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Feb 2011
    Posts
    31
    I want to add buttons on top of the invoice....copy and paste....
    how do I do this?

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Replicating 'copy/paste' options:

    1. populating variables to hold the values of current record, move to new record, then populate fields from the variables.

    2. set DefaultValue property as previously suggested

    3. INSERT query as suggested by rpeare

    Or you can normalize data and not save the related info. Why do you want to duplicate data?
    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. Replies: 3
    Last Post: 11-19-2012, 05:05 PM
  2. Replies: 7
    Last Post: 10-18-2012, 06:03 AM
  3. Replies: 1
    Last Post: 10-10-2012, 01:05 PM
  4. Replies: 11
    Last Post: 05-23-2012, 08:42 AM
  5. Copy an existing format
    By mrkaye in forum Reports
    Replies: 1
    Last Post: 10-18-2011, 02:31 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