Excel Formula to Access Expression????

Kroghr

Registered User.
Local time
Tomorrow, 02:56
Joined
Oct 20, 2008
Messages
17
Will someone please help me translate this excel formula

=IF(D35<11000,257,((D35-11000)*0.001)+257)

Into a Access expression? Cell D35 would be Unbound Field TxtZFW, and the filed that would be manipulted would be TxtLowerCG with a Value 257.

My understanding of the Formula is IF the Value of TxtZFW is Greater than 11000 than times it by .0001. If TxtZFW is 11000 or less than TxtLowerCG remains at 257

I'm trying to create a Fairchild Metroliner Aircraft Weight and Balance program. This is my first attempt at Access, and this forum has been very helpfull.
 
The formula would be

If in a query:
MyNewFieldName:IIF([TxtZFW]<11000,257,(([TxtZFW]-11000)*0.001)+257)

If in a form's control source:
Code:
=IIF([Forms]![YourFormName]![TxtZFW]<11000,257,(([Forms]![YourFormName]![TxtZFW]-11000)*0.001)+257)
Or if in VBA code:
Code:
IF Me!TxtZFW<11000 Then
    Me.YourControlName = 257
Else
    Me.YourControlName = ((Me!TxtZFW-11000)*0.001)+257)
End If
 

Users who are viewing this thread

Back
Top Bottom