B
Bob Barnes
Trying to import an "Export" file from Syware Visual CE. It creates an ASCII
file, but doesn't have an extension. A sample file is 050014083106...and
calls itself a "text" file. I then save that file as an Excel CSV file.
The code snippet below fails on the Open statement. It is attempting to Open
"C:\CEFiles\050014083106.csv" in this case.
Any ideas??? TIA - Bob
Open "C:\CEFiles\" & cboFileCE For Input As iNumOne <----Errors here as
Set Z = CurrentDb Error Number 52: Bad file name or number
Set RS = Z.OpenRecordset("FromCE")
Do Until EOF(iNumOne)
Input #iNumOne, vStore, vVarZ, vLastInsp, vOneVar, VQues, vTheQues, vAns, _
vComment, vSC, vCD, vCact, vOReason
With RS
.AddNew
!Store = Trim(vStore): !VarZ = vVarZ: !LastInsp = vLastInsp: !OneVar =
vOneVar
!Question = VQues: !Answer = vAns: !Comment = Trim(vComment): !SchCorr = vSC
!CorrDate = vCD: !CAction = Trim(vCact): !OReason = Trim(vOReason)
.Update
End With
Loop
file, but doesn't have an extension. A sample file is 050014083106...and
calls itself a "text" file. I then save that file as an Excel CSV file.
The code snippet below fails on the Open statement. It is attempting to Open
"C:\CEFiles\050014083106.csv" in this case.
Any ideas??? TIA - Bob
Open "C:\CEFiles\" & cboFileCE For Input As iNumOne <----Errors here as
Set Z = CurrentDb Error Number 52: Bad file name or number
Set RS = Z.OpenRecordset("FromCE")
Do Until EOF(iNumOne)
Input #iNumOne, vStore, vVarZ, vLastInsp, vOneVar, VQues, vTheQues, vAns, _
vComment, vSC, vCD, vCact, vOReason
With RS
.AddNew
!Store = Trim(vStore): !VarZ = vVarZ: !LastInsp = vLastInsp: !OneVar =
vOneVar
!Question = VQues: !Answer = vAns: !Comment = Trim(vComment): !SchCorr = vSC
!CorrDate = vCD: !CAction = Trim(vCact): !OReason = Trim(vOReason)
.Update
End With
Loop