简体   繁体   中英

Formulas in Ms Access

I Need To write some formulas to calculate Field Value based on other fields values ( as like as what we do in excel ) , What is the best way to do it ? could you please recommend references ? thanks

Does this help?

http://www.techonthenet.com/access/functions/

If you are using MS Access in Design mode the online help and the code completion are quite good, they will guide you to make almost effortless.

You should give more details about what you want the formulas to do.

In short though you can enter formula sin the query design like this

NewColumnName: (value / formula)

When referencing other fields you want to include them in []

So you can say :

NewColumnName: [Column1] + 5

Finally if you plan to sart usng excel If statements, note that the syntax is similear but it's called IIF so it would be like:

NewColumnName: IIF( [Column1] > 0 , "Positive","Negitive")

I have a similar question - I have a table in MS Access that keeps the record of day to day expenses. The fields are :

ID :         AutoNumber
CompanyName: Text
AmountExcl : Currency
AmountVAT :  Currency
AmountIncl : Currency
Category :   Text

Now, I want the field AmountIncl to sum the amounts of AmountExcl + AmountVAT automatically. Will appreciate your advice.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM