Hi,
can anyone here give me some hints/tips how to fix this problem....at the moment, I have this code below to retrieve the informations from another table (this table contains imported XML data thru ASP coding)... what happened is the ASP programmer didn't follow my specification and made a new table for him to populate...
so here's the code
Dim i As Integer, tickCounter As Integer
Dim db As DAO.Database, rs As DAO.Recordset, txtEMP As String
Dim strSQL
txtEMP = Me.EMPID.Value
strSQL = "SELECT xmlresult.EMPID, xmlresult.matchJursId, xmlresult.matchesFound, xmlresult.importDate FROM xmlresult WHERE xmlresult.EMPID='" & txtEMP & "';"
Set db = CurrentDb
Set rs = db.OpenRecordset(strSQL)
tickCounter = 0
i = 0
rs.MoveFirst
For i = 1 To 8 ' the table contains 8 records consistently
'MsgBox rs.Fields("matchJursId").Value & " " & rs.Fields("matchesFound").Value
If rs.Fields("matchJursId").Value = "AFP" Then
Me.afpMatch.Value = rs.Fields("matchesFound").Value
ElseIf rs.Fields("matchJursId").Value = "NSW" Then
Me.nswMatch.Value = rs.Fields("matchesFound").Value
ElseIf rs.Fields("matchJursId").Value = "VIC" Then
Me.vicMatch.Value = rs.Fields("matchesFound").Value
ElseIf rs.Fields("matchJursId").Value = "QLD" Then
Me.qldMatch.Value = rs.Fields("matchesFound").Value
ElseIf rs.Fields("matchJursId").Value = "SA" Then
Me.saMatch.Value = rs.Fields("matchesFound").Value
ElseIf rs.Fields("matchJursId").Value = "WA" Then
Me.waMatch.Value = rs.Fields("matchesFound").Value
ElseIf rs.Fields("matchJursId").Value = "TAS" Then
Me.tasMatch.Value = rs.Fields("matchesFound").Value
ElseIf rs.Fields("matchJursId").Value = "NT" Then
Me.ntMatch.Value = rs.Fields("matchesFound").Value
End If
If rs.Fields("matchesFound").Value = True Then
tickCounter = tickCounter + 1
End If
Me.txtDateXML.Value = rs.Fields("importDate").Value
rs.MoveNext
Next i
Me.txtNumOfResult.Value = tickCounter
rs.Close
End Sub
Now my question is there a way to update the table by using similar concept I used on the top ?? On the code on the top, I have to go thru all the records to update each applicants... thanks in advance...
can anyone here give me some hints/tips how to fix this problem....at the moment, I have this code below to retrieve the informations from another table (this table contains imported XML data thru ASP coding)... what happened is the ASP programmer didn't follow my specification and made a new table for him to populate...
so here's the code
Dim i As Integer, tickCounter As Integer
Dim db As DAO.Database, rs As DAO.Recordset, txtEMP As String
Dim strSQL
txtEMP = Me.EMPID.Value
strSQL = "SELECT xmlresult.EMPID, xmlresult.matchJursId, xmlresult.matchesFound, xmlresult.importDate FROM xmlresult WHERE xmlresult.EMPID='" & txtEMP & "';"
Set db = CurrentDb
Set rs = db.OpenRecordset(strSQL)
tickCounter = 0
i = 0
rs.MoveFirst
For i = 1 To 8 ' the table contains 8 records consistently
'MsgBox rs.Fields("matchJursId").Value & " " & rs.Fields("matchesFound").Value
If rs.Fields("matchJursId").Value = "AFP" Then
Me.afpMatch.Value = rs.Fields("matchesFound").Value
ElseIf rs.Fields("matchJursId").Value = "NSW" Then
Me.nswMatch.Value = rs.Fields("matchesFound").Value
ElseIf rs.Fields("matchJursId").Value = "VIC" Then
Me.vicMatch.Value = rs.Fields("matchesFound").Value
ElseIf rs.Fields("matchJursId").Value = "QLD" Then
Me.qldMatch.Value = rs.Fields("matchesFound").Value
ElseIf rs.Fields("matchJursId").Value = "SA" Then
Me.saMatch.Value = rs.Fields("matchesFound").Value
ElseIf rs.Fields("matchJursId").Value = "WA" Then
Me.waMatch.Value = rs.Fields("matchesFound").Value
ElseIf rs.Fields("matchJursId").Value = "TAS" Then
Me.tasMatch.Value = rs.Fields("matchesFound").Value
ElseIf rs.Fields("matchJursId").Value = "NT" Then
Me.ntMatch.Value = rs.Fields("matchesFound").Value
End If
If rs.Fields("matchesFound").Value = True Then
tickCounter = tickCounter + 1
End If
Me.txtDateXML.Value = rs.Fields("importDate").Value
rs.MoveNext
Next i
Me.txtNumOfResult.Value = tickCounter
rs.Close
End Sub
Now my question is there a way to update the table by using similar concept I used on the top ?? On the code on the top, I have to go thru all the records to update each applicants... thanks in advance...