Hi,
I was wondering if anyone could help please? Im trying to create an export which exports only newly added records from a table to a csv. Currently I have a query which links to the code below and exports all records.
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 = "********" Then
DoCmd.OutputTo acOutputQuery, "ExportCSVQuery", "MicrosoftExcel(*.xlsx)", "N:\Database\Output.csv", False, ""
Else
MsgBox "Sorry, you do not have access to this function", _
vbOKOnly, "Important Information"
Exit Sub
End If
End Sub
Would I need to add some sort of flag which indicates that a record has been exported alreasy or is there another method?
Thanks