Field can not be updated....Why?

  • Thread starter Thread starter shiro
  • Start date Start date
S

shiro

Dear All,

Why does access send me below error message

"! Field can not be updated "

I type some value to my field but the error message
appear,I have to click OK 4 times and then the value
I type is typed.And this condition occur for the first typing only
then others work normally.?Any guidance?

I think this error occur cause I input the data into
a child table,but although the relationship is deleted,
the problem still exist.Why?

I use access 2000 and my form type is continuous form.
I plan it to become subform.Please help.Any assist would
be greatly appreciated.Thank's

========
Shiro
========
 
What is the Record Source for this form?
Is it a query that uses 2 or more tables?

If so, here are some suggestions:

1. Be sure to put the relationship back in, with Referential Integrity
enforced. (Without the unique index, the fields will be read-only.)

2. Which side of the join does this field come from? In general it's not a
good idea to try to edit, add, or delete records in a multi-table query. You
need to be really clear about which table you are actually adding records to
or deleting from.

3. Is there a Default Value set for any of the control in the form, or the
fields in the table? If so, does it make any difference if you clear the
default value? There are circumstances where Access gives this error message
erroneously. (It has to do with default values in the lookup table, when you
are actually adding fields to the other table, but Access gets confused
about assigning the default values for the other table.)
 
Dear Allen,
Below are the record source of the form:

SELECT [Inspection result_tbl].Model, [Inspection result_tbl].[Input
voltage], [Inspection result_tbl].[Lot no], [Inspection result_tbl].[Input
date], [Inspection result_tbl].RPM_1, [Inspection result_tbl].Current_1,
[Inspection result_tbl].[Lock current_1], [Inspection result_tbl].RPM_2,
[Inspection result_tbl].Current_2, [Inspection result_tbl].[Lock current_2],
[Inspection result_tbl].Inspector, ([Input voltage]*[Current_1]) AS
WattCurr1, ([Input voltage]*[Current_2]) AS WattCurr2, ([Input
voltage]*[Lock current_1]) AS WattLockCurr1, ([Input voltage]*[Lock
current_2]) AS WattLockCurr2
FROM [Inspection result_tbl]
WHERE ((([Inspection result_tbl].Model)=[Forms]![Start input
data_frm]![list_Model]) AND (([Inspection result_tbl].[Lot
no])=[Forms]![Start input data_frm]![LotNo]));

And for the others

1.I'm sure Referential integrity is checked in my relationship.

2.Actually,I also using this table in another query ( a multi
table query like u say ) and right joined the Model field.
But unupdated field is not the model field.

3.Yes,there are some default value supplied in my forms control
( but only in form not in the table ).The default value come from
a list model in a form.But although I had delete all the deault value,
it doesn't make any sense.

Hope my explanation enough for you to assist me more.
Thank's
 
3.Yes,there are some default value supplied in my forms control
( but only in form not in the table ).The default value come from
a list model in a form.But although I had delete all the deault value,
it doesn't make any sense.

Addition :
In the table,for numeric field the default value is 0




shiro said:
Dear Allen,
Below are the record source of the form:

SELECT [Inspection result_tbl].Model, [Inspection result_tbl].[Input
voltage], [Inspection result_tbl].[Lot no], [Inspection result_tbl].[Input
date], [Inspection result_tbl].RPM_1, [Inspection result_tbl].Current_1,
[Inspection result_tbl].[Lock current_1], [Inspection result_tbl].RPM_2,
[Inspection result_tbl].Current_2, [Inspection result_tbl].[Lock current_2],
[Inspection result_tbl].Inspector, ([Input voltage]*[Current_1]) AS
WattCurr1, ([Input voltage]*[Current_2]) AS WattCurr2, ([Input
voltage]*[Lock current_1]) AS WattLockCurr1, ([Input voltage]*[Lock
current_2]) AS WattLockCurr2
FROM [Inspection result_tbl]
WHERE ((([Inspection result_tbl].Model)=[Forms]![Start input
data_frm]![list_Model]) AND (([Inspection result_tbl].[Lot
no])=[Forms]![Start input data_frm]![LotNo]));

And for the others

1.I'm sure Referential integrity is checked in my relationship.

2.Actually,I also using this table in another query ( a multi
table query like u say ) and right joined the Model field.
But unupdated field is not the model field.

3.Yes,there are some default value supplied in my forms control
( but only in form not in the table ).The default value come from
a list model in a form.But although I had delete all the deault value,
it doesn't make any sense.

Hope my explanation enough for you to assist me more.
Thank's




Allen Browne said:
What is the Record Source for this form?
Is it a query that uses 2 or more tables?

If so, here are some suggestions:

1. Be sure to put the relationship back in, with Referential Integrity
enforced. (Without the unique index, the fields will be read-only.)

2. Which side of the join does this field come from? In general it's not a
good idea to try to edit, add, or delete records in a multi-table query. You
need to be really clear about which table you are actually adding
records
to
or deleting from.

3. Is there a Default Value set for any of the control in the form, or the
fields in the table? If so, does it make any difference if you clear the
default value? There are circumstances where Access gives this error message
erroneously. (It has to do with default values in the lookup table, when you
are actually adding fields to the other table, but Access gets confused
about assigning the default values for the other table.)
 
Okay, your SQL statement indicates there is only one table, so it does not
have anything to do with default values. (I am assuming that [Inspection
result_tbl] is a table, not a query.)

You will not be able to edit the calculated fields: WattCurr1, WattCurr2,
WattLockCurr1, or WattLockCurr2. The other fields should be editable.

Suggestions:

1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact/Repair

3. Whatever text box you are having trouble with, make sure its Name
property is not the same as another field. For example, if its Control
Source is Model, it must not be named RPM_1.

4. Temporarily remove any code or macros in the events of the controls or
the form. If this fixes the issue, the problem is with the code. For
example, if you dirty the form in its AfterUpdate event, you will have
trouble moving to another row of the continuous form.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

shiro said:
3.Yes,there are some default value supplied in my forms control
( but only in form not in the table ).The default value come from
a list model in a form.But although I had delete all the deault value,
it doesn't make any sense.

Addition :
In the table,for numeric field the default value is 0
SELECT [Inspection result_tbl].Model,
[Inspection result_tbl].[Input voltage],
[Inspection result_tbl].[Lot no],
[Inspection result_tbl].[Input date],
[Inspection result_tbl].RPM_1,
[Inspection result_tbl].Current_1,
[Inspection result_tbl].[Lock current_1],
[Inspection result_tbl].RPM_2,
[Inspection result_tbl].Current_2,
[Inspection result_tbl].[Lock current_2],
[Inspection result_tbl].Inspector,
([Input voltage] * [Current_1]) AS WattCurr1,
([Input voltage] * [Current_2]) AS WattCurr2,
([Input voltage] * [Lock current_1]) AS WattLockCurr1,
([Input voltage] * [Lock current_2]) AS WattLockCurr2
FROM [Inspection result_tbl]
WHERE ((([Inspection result_tbl].Model) =
[Forms]![Start input data_frm]![list_Model])
AND (([Inspection result_tbl].[Lot no]) =
[Forms]![Start input data_frm]![LotNo]));
 
Back
Top