shabbaranks
Registered User.
- Local time
- Today, 12:15
- Joined
- Oct 17, 2011
- Messages
- 300
Hi peeps!!
Im not entirely sure how to achieve this, I would like to setup an export which exports only newly added records from a table to a csv. Currently I have an export (based on a query) which exports everything. Would I need to create some sort of flag which indicates a record has already been exported? My current code is below
I am unable to add a flag to the exported CSV as the columns it exports to have to be an exact match to the place they will be imported to so I am unable to add additionals.
Thanks

Im not entirely sure how to achieve this, I would like to setup an export which exports only newly added records from a table to a csv. Currently I have an export (based on a query) which exports everything. Would I need to create some sort of flag which indicates a record has already been exported? My current code is below
Code:
Private Sub ExportCSV_Click()
Dim strPasswd
strPasswd = InputBox("Enter Password", "Restricted Form")
If strPasswd = "" Or strPasswd = Empty Then
MsgBox "No Input Provided", vbInformation, "Required Data"
Exit Sub
End If
If strPasswd = "export" Then
DoCmd.OutputTo acOutputQuery, "ExportCSVQuery", "MicrosoftExcel(*.xlsx)", "N:\Timesheet Database\Output.csv", False, ""
Else
MsgBox "Sorry, you do not have access to this function", _
vbOKOnly, "Important Information"
Exit Sub
End If
End Sub
I am unable to add a flag to the exported CSV as the columns it exports to have to be an exact match to the place they will be imported to so I am unable to add additionals.
Thanks

Last edited: