how to write a value in a calculated field & and how to show the a field in another field with a specific condition (1 Viewer)

mostafaelkady98

New member
Local time
Today, 13:36
Joined
Aug 1, 2021
Messages
3
hello everyone I am new to access,and I created this query to calculate the price of land by multiplying the area with a certain value the area of the land is calculated by multiplying the length and the width my question is if a don't have the length and width a just want to type in the area in a calculated field how can I do that?
I thought about creating another field called area that I can just type a number in it and the DesignPrice column will be calculated like this
DesignPrice: IIf([AreaCalculated]=0,[Table2]![TypeValue]*[Area],[Table2]![TypeValue]*[AreaCalculated])
but I want to show in my from only 1 area field not "AreaCalculated" and "Area" so I wanted to hide the "AreaCalculated" column and if the "AreaCalculated" is more than zero the value of the "AreaCalculated" field is shown in the "Area" field if not I can type a custom value in the "Area" field but I couldn't find I way to do it

Capture.JPG
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:36
Joined
May 7, 2009
Messages
14,153
use a Form so you can do what you need to accomplish.
see this demo.
 

Attachments

  • area.accdb
    512 KB · Views: 46

theDBguy

I’m here to help
Staff member
Local time
Today, 04:36
Joined
Oct 29, 2018
Messages
16,599
Hi. Welcome to AWF!

Unfortunately, a calculated column is basically read only.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 07:36
Joined
Feb 19, 2002
Messages
33,281
I know what you mean:) Glad that was useful. I'm all about KISS and not coding around a problem I can solve some other way.
 

Users who are viewing this thread

Top Bottom