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, 21:00
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
Tomorrow, 03:00
Joined
May 7, 2009
Messages
19,169
use a Form so you can do what you need to accomplish.
see this demo.
 

Attachments

  • area.accdb
    512 KB · Views: 269

theDBguy

I’m here to help
Staff member
Local time
Today, 12:00
Joined
Oct 29, 2018
Messages
21,358
Hi. Welcome to AWF!

Unfortunately, a calculated column is basically read only.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:00
Joined
Feb 19, 2002
Messages
42,971
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