Hi,
i am working with a text file which isn't delimited by zeros.I want to go and search for the correct record, and then replace a piece of the string with something.
I have the string being replaced but the details aren't getting written back to the text file.
here is my code. i know i'm missing something in the IF statement. Any ideas.
Thanks Ems
Open Reports For Input As #3
Do Until EOF(3)
Line Input #3, TotalDetails
nUserName = Mid(TotalDetails, 1, 15)
nUserName = Trim(nUserName)
If (nUserName = frmStudentLogin.UserName) Then
Mid(TotalDetails, 57, 2) = Val(Quiz1Counter)
End If
Loop
Close #3
i am working with a text file which isn't delimited by zeros.I want to go and search for the correct record, and then replace a piece of the string with something.
I have the string being replaced but the details aren't getting written back to the text file.
here is my code. i know i'm missing something in the IF statement. Any ideas.
Thanks Ems
Open Reports For Input As #3
Do Until EOF(3)
Line Input #3, TotalDetails
nUserName = Mid(TotalDetails, 1, 15)
nUserName = Trim(nUserName)
If (nUserName = frmStudentLogin.UserName) Then
Mid(TotalDetails, 57, 2) = Val(Quiz1Counter)
End If
Loop
Close #3