# How to enter algebra formula?

#### Heidi21001

##### New Member
I am new to access 2003 and I've been trying to add a formula to an existing access form.

The Formula I need solved is

(((L x R)(/A))(/12))=F

L - Labels
R - Repeat
A - Across
F - Footage

I want to be able to enter the various numbers and have it solve what's missing. I always have the repeat and across, but I need to figure Labels or Footage (depending on what info is given to me)

Is this possible in access?

### Excel Facts

Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

#### revans

##### Well-known Member
Definately possible. Let me wave some air code around...

Public function CalcFootage(L as long, R as long, A as long) as single
CalcFootage=(((L x R)(/A))(/12))
End Function

Public Function CalcLabels(R as long, A as long, F as single) as single
CalcLabels=[too early for me to figure out how to solve for L, sorry]
end function

Then you would call the proper fx as necessary

hth,

Rich

#### revans

##### Well-known Member
Now that I think about it I didn't really answer your question. You can write a wrapper fx that takes all four inputs and runs with it.

Public Function CalcMyStuff(R as long, A as long, Optional L as long=0, Optional F as single=0) as single

If L>0 then
CalcMystuff=CalcFootage(l,r,a)
elseif F>0 then
CalcMyStuff=CalcLabels(r,a,f)
else
CalcMyStuff=0
end if
End function

Last edited: