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
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
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.
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.
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?
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.
I want to add buttons on top of the invoice....copy and paste....
how do I do this?
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.