error'13':Type Mismatch cant pass text+integer while reading text

error'13':Type Mismatch cant pass text+integer while reading text

Post by U25ld » Sun, 11 Sep 2005 17:10:02


hi

can any one tell me that how can i pass a text & integer combined on this
line
Open "c:\a.txt" For Input As #rsProduction("Job_No")

as im getting error of type mismatch if its integer it work fine but whent
both text and integer then error occur, i dont know if im doing it right

a.txt
Y:\S2\vce\090805\D5\davi718.wav
Y:\S2\vce\090805\D5\davi719.wav
Y:\S2\vce\090805\D5\33719.wav

Job_No

davi719
33719
davi718


Public Sub PV()

Dim retval As Double
retval = Shell(App.path & "\V.bat", vbHide)

Dim rsProduction As dao.Recordset
Dim dbProduction As dao.Database
Dim rsVendor As dao.Recordset
Dim c As String

Set dbProduction = dao.OpenDatabase(DataPath, True, False, ";pwd=cb")
Set rsProduction = dbProduction.OpenRecordset("Select * from P where
[date]=#" & Date & "#")

midMain.Caption = midMain.Caption & "---- Processing
........................."
While Not rsProduction.EOF

Open "c:\a.txt" For Input As #rsProduction("Job_No")
Do While Not EOF(rsProduction("Job_No"))

Input #rsProduction("Job_No"), strValue
a = Split(Replace(Replace(strValue, ".wav", ""), "Z:\", ""), "\")
V = a(5)

If V = rsProduction("Job_No") Then
If rsProduction.BOF = True Then
rsProduction.AddNew
Else
rsProduction.Edit
End If

rsProduction("Vendor_ID") = a(1)
rsProduction.Update

End If
Loop

Close #rsProduction("Job_No")
rsProduction.MoveNext

Wend
midMain.Caption = "A"
End Sub
 
 
 

error'13':Type Mismatch cant pass text+integer while reading text

Post by erewho » Sun, 11 Sep 2005 18:29:39

On Sat, 10 Sep 2005 01:10:02 -0700, "=?Utf-8?B?U25ldw==?="



<snip>

Dim Channel As Integer

Channel = FreeFile
Open "c:\a.txt" For Input As # Channel