blinx
10-19-2004, 08:25 PM
Hi I/m using this code:
do until rslog.eof
rslog.AddNew
rslog!branch = Left(filename, 3)
If UCase(Mid(filename, 4, 2)) = UCase(salesfile2) Then
rslog!A = "1"
rslog!Date = Mid(filename, 6, 3)
ElseIf UCase(Mid(filename, 4, 2)) = UCase(salesfile3) Then
rslog!B = "1"
end if
loop
to open recordset(rslog) and add new data to it
The problem is how to check the data so if the data has the same branch, then it would updating the data in the same row
E.g:
Branch Date A B
AAA 20 1 1
because right now, my code produce 2 line like this:
AAA 20 1
AAA 20 1
Please give me real code to solve this
Thx
do until rslog.eof
rslog.AddNew
rslog!branch = Left(filename, 3)
If UCase(Mid(filename, 4, 2)) = UCase(salesfile2) Then
rslog!A = "1"
rslog!Date = Mid(filename, 6, 3)
ElseIf UCase(Mid(filename, 4, 2)) = UCase(salesfile3) Then
rslog!B = "1"
end if
loop
to open recordset(rslog) and add new data to it
The problem is how to check the data so if the data has the same branch, then it would updating the data in the same row
E.g:
Branch Date A B
AAA 20 1 1
because right now, my code produce 2 line like this:
AAA 20 1
AAA 20 1
Please give me real code to solve this
Thx