Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need formula for If Then

Status
Not open for further replies.

loveyoursite

Technical User
Apr 14, 2005
100
US
I have a query that I am trying to build a formula in but I'm not sure how to do it. It involves three fields:
"2005 One time deduction", "2005 Amt", and "2005 Biwkly Amt". The formula result will populate the "Biwkly Amt" field. Here's what I need it to do: If "One time deduction" = "N", then "2005 Amt" divided by 26, else "N/A".

Any assistance would be greatly appreciated.
 


Hi,
Code:
iif([2005 One time deduction]="N",[2005 Amt]/26,"N/A")


Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
loveyoursite,
I'm not sure why you are mixing data types in your update. Isn't your Biwkly Amt field numeric? If so, you can't stuff "N/A" into it. You can use the format property of controls to display 0 or Null values as "N/A".

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top