S
Southern at Heart
I have this code that does a replace on my table tblContacts. It works fine
right after I've imported data from Outlook into this table. But the
strangest thing is, if I open the table and delete all the contents of one
cell, any cell, then this code gives me the error "..did not update all the
records due to 1 type conversion error...
I can type something back into that cell, and it'll work!
Why is this???
'REMOVE THE & SIGN FROM ALMOST ALL FIELDS
strSql = "Update tblContacts Set tblContacts.[HomeAddressStreet] = " &
vbCrLf & _
"Replace([HomeAddressStreet],""&"",""and""), tblContacts.[FirstName] = " &
vbCrLf & _
"Replace([FirstName],""&"",""and""), tblContacts.[LastName] = " & vbCrLf & _
"Replace([LastName],""&"",""and""), tblContacts.[HomeAddressCity] = " &
vbCrLf & _
"Replace([HomeAddressCity],""&"",""and""), tblContacts.[HomeAddressState] =
" & vbCrLf & _
"Replace([HomeAddressState],""&"",""and"")"
DoCmd.RunSQL (strSql)
thanks again.
Southern@Heart
right after I've imported data from Outlook into this table. But the
strangest thing is, if I open the table and delete all the contents of one
cell, any cell, then this code gives me the error "..did not update all the
records due to 1 type conversion error...
I can type something back into that cell, and it'll work!
Why is this???
'REMOVE THE & SIGN FROM ALMOST ALL FIELDS
strSql = "Update tblContacts Set tblContacts.[HomeAddressStreet] = " &
vbCrLf & _
"Replace([HomeAddressStreet],""&"",""and""), tblContacts.[FirstName] = " &
vbCrLf & _
"Replace([FirstName],""&"",""and""), tblContacts.[LastName] = " & vbCrLf & _
"Replace([LastName],""&"",""and""), tblContacts.[HomeAddressCity] = " &
vbCrLf & _
"Replace([HomeAddressCity],""&"",""and""), tblContacts.[HomeAddressState] =
" & vbCrLf & _
"Replace([HomeAddressState],""&"",""and"")"
DoCmd.RunSQL (strSql)
thanks again.
Southern@Heart