I have a continous form where I have two fields for people to enter the beginning and end dates of the week of their vacation. All I want to be able to do is have a label for Week 1, and then when the next form comes up it would say Week 2. I found this code in another thread:
Public Function NextI()
Static i As Integer
i = i + 1
NextI = i
End Function
When the form opens, the first record says "Week 1." As soon as I start typing, it changes to Week 2. Then the next one will say Week 3, but when I start typing there it changes to Week 4. So my form winds having Week 2 and Week 4, instead of Week 1, and Week 2.
Why is it adding 2? Thanks!
Public Function NextI()
Static i As Integer
i = i + 1
NextI = i
End Function
When the form opens, the first record says "Week 1." As soon as I start typing, it changes to Week 2. Then the next one will say Week 3, but when I start typing there it changes to Week 4. So my form winds having Week 2 and Week 4, instead of Week 1, and Week 2.
Why is it adding 2? Thanks!