I had the need to update a Currency field after importing a Customer file.
So I tried this code After Import Finished.
See below:
'** Check if specific record exists ****
dim rsExists
set dal_table=dal.Table("Customers")
set rsExists = dal_table.Query("","")
if not rsExists.eof then
' if record exists do something
[color="#FF0000"]values("posbal")=0.01
else
' if dont exist do something else
end if
rsExists.Close : set rsExists = Nothing
Worked like a charm . Without effecting records without the above value.
Now A good tip on how to set the databae value to 0 instead of null would be good. had to use .01 as even setting the default value to 0 in a number field or Currency field in asprunner goes to null even with Access default to 0.
Access DB Update See Admin's good post here :NZ Function with Null in Access Tip