PerkinsSlave
New Member
- Joined
- Feb 1, 2004
- Messages
- 26
Good evening,
I'm creating a program that imports data as part of its functionality. I'm having a problem getting one of my functions to run.
Here's an excerpt of the code:
Dim sreturn As String
Dim db As Database
Dim rs As Recordset
Dim Ssql As String
Dim iFile As Integer
Dim sFileName As String
Dim iPos As Integer
Dim sInput As String
Dim iLstPos As Integer
Dim iRow As Integer
Dim duprec As String
On Error GoTo ErrImportFile
sreturn = "File: " & conImportPath & "AgtGrpProd" & iInt & ".txt imported successfully."
Set db = CurrentDb
Ssql = "SELECT * From tblAgtGrpProd Where 1 = 2"
Set rs = db.OpenRecordset(Ssql, dbOpenDynaset)
When Access reaches the last line of code, it moves down to ErrImportFile. I have Microsoft DAO 3.51 included in my list of references... is there another one I need? Or is my syntax wrong?
Thanks!
I'm creating a program that imports data as part of its functionality. I'm having a problem getting one of my functions to run.
Here's an excerpt of the code:
Dim sreturn As String
Dim db As Database
Dim rs As Recordset
Dim Ssql As String
Dim iFile As Integer
Dim sFileName As String
Dim iPos As Integer
Dim sInput As String
Dim iLstPos As Integer
Dim iRow As Integer
Dim duprec As String
On Error GoTo ErrImportFile
sreturn = "File: " & conImportPath & "AgtGrpProd" & iInt & ".txt imported successfully."
Set db = CurrentDb
Ssql = "SELECT * From tblAgtGrpProd Where 1 = 2"
Set rs = db.OpenRecordset(Ssql, dbOpenDynaset)
When Access reaches the last line of code, it moves down to ErrImportFile. I have Microsoft DAO 3.51 included in my list of references... is there another one I need? Or is my syntax wrong?
Thanks!