I currently use the following function

Private Sub Report_Activate()
DoCmd.OutputTo 
acOutputReport, "rptInvoice", "Snapshot", "C:\Snapshots\" & Reports!
Invoice.OrderNo & ".snp", True
End Sub

However, I would like to keep a copy of each invoice version 
submitted to the customer (usually there is no more than 4).
My solution would be to create 4 
fields "snapshot1" , "snapshot2" , "snapshot3" , and "snapshot4" for 
each order.
The Report_Activate function will be removed.
It will be required to select the version before working with the 
following buttons. 
There will be a button "Create snapshot" which will create the file 
and save it into the snapshot folder, the file name will be the 
orderNo. 
For the second version, the file name will be the OrderNo & - & 1 
like 5657, 5657-1, 5657-2

Another button "Add", which will fill in the file name into the 
field snapshot1
Another button "Del", which will delete the file name from the field 
snapshot1
Another button "View", which will search for a snapshot file with a 
name matched the field snapshot1

What I need now, is a function that searches in the folder for a 
snapshot with the name matched the field on the form. Can anyone 
help me with this?

First I was thinking of creating a sub table that keeps the snapshot 
names for each order, but it turned out to be more coding.

I would appreciate if you can also tell me if there are any other 
ways.

Thank you
Joe

Reply via email to