I know how completely wrong it is to store calculated data in a table! But, in this case it is very necessary for what I need.
I am using this statement:
UPDATE BusinessStreets SET BusinessesPerStreet = DCount("*","Businesses","StreetName='" & Replace(StreetName,"'","''") & "'");
It goes to update the correct records in the table by asking if I am sure I want to continue as this cannot be undone, but then gives me an error:
Microsoft Office Access can't update all the records in the update query. Microsoft Office Access didn't update 9 field(s) due to a type conversion failure
When it says "field(s)" I am sure it means records as I have 9 records in this table at the moment, which once I have this working, I will then increase to over 100.
The field which will be updated is a Long Integer field, which should be fine as the Dcount function will yield numeric results.
What is the problem with this statement?
Thank you for giving me your time to help me with this. It's really really appreciated!!