Again, it's not clear what you're asking. What do you mean, "write the price
at the same field"? Why is writing into it not possible? Can you show us the
code you're trying to use?
Carl Rapson
I am sorry, my english is not very good, but I try to explain. The code in
the query is:
Price:IIf([m2Price]>0;[m2Price];[UnitPrice])
and this comes into the subform field (Price). Because it based on
calculation it does not allow to write in the field. I have tried put the
code as defaut value and UnitPrice as control source but the field gives
message #Name?#. As I said, occassionally need to write in the field. The
original question have solved with this code. Writing problem is new one.
Thanks for interest!

Signature
Have a Nice Day!
"Carl Rapson" kirjoitti:
> Again, it's not clear what you're asking. What do you mean, "write the price
> at the same field"? Why is writing into it not possible? Can you show us the
[quoted text clipped - 17 lines]
> >> price,
> >> but no both simultaneously.
Carl Rapson - 31 May 2007 17:54 GMT
Instead of putting the IIf statement into the Control Source of the Price
field, put the code into the subform's Current event instead. That way,
whenever the user moves to the record, the Price field will be calculated
and displayed, but the user can still enter a different value.
Carl Rapson
>I am sorry, my english is not very good, but I try to explain. The code in
> the query is:
[quoted text clipped - 29 lines]
>> >> price,
>> >> but no both simultaneously.
Marshall Barton - 31 May 2007 19:18 GMT
>Instead of putting the IIf statement into the Control Source of the Price
>field, put the code into the subform's Current event instead. That way,
>whenever the user moves to the record, the Price field will be calculated
>and displayed, but the user can still enter a different value.
That is not a good idea, Carl. Just navigating to a record
is not sufficient reason to change a value, especially if a
user had set it previously.
I don't really understand what Mark is tring to do here, but
maybe some code in the form's BeforeUpdate event can check
if the value is Null and only then set it.

Signature
Marsh
MVP [MS Access]