Updating a calculated field

BillyDo

Registered User.
Local time
Today, 14:31
Joined
May 19, 2011
Messages
17
Hi all

I am trying to use an update query to update a field in another query. However I am getting an "operation must use an updateable query" error.

After a bit of research, I think this is because I am tryin to update a calculated field.

Is there a way around this? Many thanks

The SQL is just the following

Code:
UPDATE [TableA] SET [TableA].Hours = "1"
WHERE ((([TableA].FieldA)=[]));
 
In this code
UPDATE [TableA] SET [TableA].Hours = "1"
WHERE ((([TableA].FieldA)=[]));

You are indicating Hours is a text data type. Is that correct? If you plan on aritmetic with Hours it should be number data type.

Because you have NO embedded spaces in your field names, you do NOT need [ or ].

Is the current value of FieldA Null or "" empty?

If Hours is number data type, and FieldA is NULL, you could use

UPDATE [TableA] SET [TableA].Hours = 1
WHERE ((([TableA].FieldA) IS NULL));
 
In this code


You are indicating Hours is a text data type. Is that correct? If you plan on aritmetic with Hours it should be number data type.

Because you have NO embedded spaces in your field names, you do NOT need [ or ].

Is the current value of FieldA Null or "" empty?

If Hours is number data type, and FieldA is NULL, you could use

Hi thanks for your reply

I should have explained that in the query- field A isnt Null or empty, it has a value. I want the user to be able to input a value, hence the [].

Hours is a number type but it is a calculated field, which is why Access seems to be stopping me editing.
Any ideas?

Thanks
 
What value will be inputted for fieldA?
Are you just hoping to match an existing record (or several existing records)?

Please describe the process with all the pieces.
 

Users who are viewing this thread

Back
Top Bottom