In a report, I had a field expression like so: (VraiFaux is French for IIf)
=VraiFaux(Somme([Nombre_Km]*54)/100+Somme([Montant_fixe]*54/47)+Somme([Montant_stationnement_etc])<15 AND Somme([Nombre_Km]*54)/100+Somme([Montant_fixe]*54/47)+Somme([Montant_stationnement_etc])>0
,15,Somme([Nombre_Km]*54/100)+Somme([Montant_fixe]*54/47)+Somme([Montant_stationnement_etc]))
Basically, if the calculated value was less than 15, then make it 15, else put in the calculated value.
This worked fine, until I realized that I didn't want 0 to be rounded up to 15. When I tried to correct for this by changing the expression to
=VraiFaux(Somme([Nombre_Km]*54)/100+Somme([Montant_fixe]*54/47)+Somme([Montant_stationnement_etc])<15 AND Somme([Nombre_Km]*54)/100+Somme([Montant_fixe]*54/47)+Somme([Montant_stationnement_etc])>0
,15,Somme([Nombre_Km]*54/100)+Somme([Montant_fixe]*54/47)+Somme([Montant_stationnement_etc]))
I got an error about how this was too long. I am not an Access expert, this is in the report field property sheet. I am not sure how to change my report so this does what I want. There is a bit of code in my project.