Update Query

StacyStacy

A "Californian" at heart!
Local time
Today, 10:25
Joined
Jan 29, 2003
Messages
159
I'm modifying an existing db that has a field in the table named "city". To reduce errors, I have created in the form a dropdown field for the city. In the dropdown menu, the city field is blank. I also created an update query to update all records with the city named "Sardis" . I'm getting an error because there isn't data in between the quotes.

Here's my code:

UPDATE T_DislWkr SET T_DislWkr.C_City=""
FROM T_DislWkr
WHERE (((T_DislWkr.C_City)="Sardis"));


Please help
Thanks
 
Open your table and check if C_City has its Allow Zero Length property set to Yes or No.
 
Thanks, I cannot get past this error msg:
"The Value you entered is not valid for this field. For Example, you may have entered text in a numeric field or a number that is larger than the fieldsize setting permits"

To eradicate that error, I have to re-create my fields all over again. I tried going into the table properties and the field properties on the form to fix but it does not work. I don't understand why this is happening.
 
I am still having the same problems ("The Value you entered is not valid for this field. For Example, you may have entered text in a numeric field or a number that is larger than the fieldsize setting permits"). None of my fields are numeric. They are text and this doesn't make sense. I've even compacted and repaired my db. Also, I cannot change the field to "Null", only "yes" or "No" to a zero-length string is allowed in the field properties within the table.

Please help. Thanks.
 
Fields With A Problem

No. I didn't. We are talking about 2 different issues. I am no longer addressing the update issue. My problem is that when I am in form mode and when I tab through the fields in my form, I get the following message: "The Value you entered is not valid for this field. For Example, you may have entered text in a numeric field or a number that is larger than the fieldsize setting permits".

There are no quotes ... it's just the way I typed the message for ease of reading.

So sorry for the discrepancy.
 
Yes, I get the message when I tab through the fields.
No, I'm not changing anything.

As many times as I have done this, this has never happened before. Thanks for helping me.
 

Users who are viewing this thread

Back
Top Bottom