BHScripter
Technical User
Hi:
I have an access database and monthly we import invoices via csv files. The problem is that the file sometimes gets imported more than once.
the procedure is such that the csv file is imported into a holding table where it is given a provider ID number and then that info is updated into the main table.
Is there a way to look at the invoice # and date of the csv file even prior to pulling it into the holding table?
This is the script as it exists now:
Private Sub AT_T_Import_Button_Click()
DoCmd.SetWarnings False
Dim strMessage As String
Dim intOptions As Integer
Dim bytChoice As Byte
strMessage = "You are about to import an Invoice - You'd better be sure!"
intOptions = vbQuestion + vbOKCancel
bytChoice = msgbox(strMessage, intOptions)
If bytChoice = vbCancel Then
Cancel = True
Else
' Import ATT.csv using AT&T Spec
DoCmd.TransferText acImportDelim, "AT&T Import Specification", "TblNewTrans", "m:\management\import files\att.csv", False, ""
' Update Provider ID in TblNewTrans
DoCmd.OpenQuery "qupdProvID inTblNewTrans", acViewNormal, acEdit
' Runs Unmatched query to validate there are matched records in IT Provider Master Table
DoCmd.OpenQuery "qValidateImportedInvoice", acViewNormal, acEdit
End If
Thanks in advance,
Brianna
I have an access database and monthly we import invoices via csv files. The problem is that the file sometimes gets imported more than once.
the procedure is such that the csv file is imported into a holding table where it is given a provider ID number and then that info is updated into the main table.
Is there a way to look at the invoice # and date of the csv file even prior to pulling it into the holding table?
This is the script as it exists now:
Private Sub AT_T_Import_Button_Click()
DoCmd.SetWarnings False
Dim strMessage As String
Dim intOptions As Integer
Dim bytChoice As Byte
strMessage = "You are about to import an Invoice - You'd better be sure!"
intOptions = vbQuestion + vbOKCancel
bytChoice = msgbox(strMessage, intOptions)
If bytChoice = vbCancel Then
Cancel = True
Else
' Import ATT.csv using AT&T Spec
DoCmd.TransferText acImportDelim, "AT&T Import Specification", "TblNewTrans", "m:\management\import files\att.csv", False, ""
' Update Provider ID in TblNewTrans
DoCmd.OpenQuery "qupdProvID inTblNewTrans", acViewNormal, acEdit
' Runs Unmatched query to validate there are matched records in IT Provider Master Table
DoCmd.OpenQuery "qValidateImportedInvoice", acViewNormal, acEdit
End If
Thanks in advance,
Brianna