Omit Zero from default value deducting numbers?

Fi_McC

New member
Local time
Today, 03:32
Joined
Mar 1, 2021
Messages
7
Hello,

I have a default value in a form based on a DMin value -1 , so that the 'Week Number' in a new record is one number less than the existing values in that field. Is there a way that I can get it to exclude zero? I would like the numbers to only be positive or negative integers. So that the week numbers will end up as 5, 4, 3, 2, 1, -1, -2 etc. Is this possible?
 
use IIF()

=IIF(DMin("field", "table", "condition") -1 = 0, -1, DMin("field", "table", "condition") -1)
 
Marvellous. Thank-you!
 

Users who are viewing this thread

Back
Top Bottom