I think this might be simple to solve.
I have a dbase in which I am trying to append tbl2 to tbl1 and at the same time setting all of tbl1 type fields that are null to D. The assigning D is ok but the problem lies in trying to append based on the CheckNo.
tbl1 has check numbers that go from 1 all the way to 10015. I only want to append the new check numbers, ie 10016 and above. The problem is that we changed the check number field from text to number and now the last line bombs. How can I make it work if so that it reads numbers.
Here's the code:
DoCmd.RunSQL "Update [tbl DDRetAccum]" & _
"Set Type = ""D"" " & _
" "Where Type is null and CheckNo > ""0000"" " - this line bombs, it wants a number.
I have a dbase in which I am trying to append tbl2 to tbl1 and at the same time setting all of tbl1 type fields that are null to D. The assigning D is ok but the problem lies in trying to append based on the CheckNo.
tbl1 has check numbers that go from 1 all the way to 10015. I only want to append the new check numbers, ie 10016 and above. The problem is that we changed the check number field from text to number and now the last line bombs. How can I make it work if so that it reads numbers.
Here's the code:
DoCmd.RunSQL "Update [tbl DDRetAccum]" & _
"Set Type = ""D"" " & _
" "Where Type is null and CheckNo > ""0000"" " - this line bombs, it wants a number.