# How can I use functions & formulas in database fields? [closed]

I am a long-time user of Microsoft Works, since it first came out (latest version 4.5, circa 1998), and am now looking at moving over to LibreOffice. I have had to stop upgrading at version 4.5 since later “upgrades” have not been able to work with my files and I’m concerned about how long I can carry 4.5 with each system upgrade (currently working on Vista).

Databases are what I use most in my business. One primary database I create annually has an average of 100 records with 55 fields - 10 fields of which have either a formula or a function and 7 fields have fixed data (unless I need to change it). I’ve been able to move my Works databases to LibreOffice, however, I’m having trouble figuring out how to plug formulas and functions into LO database fields. Examples of these, using references to other fields, are:

```
=IF(Deposit>0#OR#Payment>0#OR#Balance=0,"Booked","Tentative"),
=IF(Balance=0#AND#(Paymt Posted>0#OR#Total Due=0),"Paid",IF(Date Start NOW()>30#AND#Balance>0,SUM(Date Start-30),NOW())),
=IF(Time Start>0,Time Start-0.04166," "),
=Total Due-(Deposit+Payment)
```

I don't have any problems with the formulas or functions - yet. My problem right now is how to plug a formula or function into a database field.

Any suggestions would be appreciated.

@Skipper -- Still looking for an Answer to this question?