G
Guest
I'm trying to update a field TRAN_Flag when the ADM_DT and SERV_DT are equal.
I'm chose not to use a query as I am sorting by PAT_ACCT_NBR and looping
through my record set because I need to read each record to look for other
information. Only problem I'm having at the moment is actually setting the
field to 1 in my table.
If rs.Fields("ADM_DT") = rs.Fields("SERV_DT") Then
Dim strSQL1 As String
strSQL1 = "UPDATE rab_fullday SET rab_fullday.TRAN_Flag = 1 " & _
"WHERE PAT_ACCT_NBR =" & rs.Fields("PAT_ACCT_NBR") & _
" AND SERV_DT =" & rs.Fields("SERV_DT")
DoCmd.RunSQL strSQL1
I'm chose not to use a query as I am sorting by PAT_ACCT_NBR and looping
through my record set because I need to read each record to look for other
information. Only problem I'm having at the moment is actually setting the
field to 1 in my table.
If rs.Fields("ADM_DT") = rs.Fields("SERV_DT") Then
Dim strSQL1 As String
strSQL1 = "UPDATE rab_fullday SET rab_fullday.TRAN_Flag = 1 " & _
"WHERE PAT_ACCT_NBR =" & rs.Fields("PAT_ACCT_NBR") & _
" AND SERV_DT =" & rs.Fields("SERV_DT")
DoCmd.RunSQL strSQL1