Advertisement
Advertisement
| 05.27.2008 at 03:22PM PDT, ID: 23436560 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: |
Private Sub cmdSentFileImport_Click()
On Error GoTo Err_cmdSentFileImport_Click
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim rstImportedSentFiles As DAO.Recordset
Dim rstSettings As DAO.Recordset
Dim strBeginBrowse As String
Dim strPathName As String
Dim strFileName As String
Dim strSQL As String
Set db = CurrentDb()
'Set rstSettings = db.OpenRecordset("Settings")
Set rstImportedSentFiles = db.OpenRecordset("ImportedSentFileNames")
strBeginBrowse = "\\nq01ana001\senior\d_ops\Bene\QSSI_Sent"
strPathName = OpenFile(strBeginBrowse)
strFileName = SelectFileName(strPathName)
'catch common mistakes
If strFileName = "" Then
MsgBox "No file was selected"
Exit Sub
ElseIf Left(strFileName, 6) <> rstSettings!SentFilePrefix Then
MsgBox "This file does not have the correct name. Please check settings"
Exit Sub
End If
|