V
Victoria
Unfortunately, it's been 9 months since I've really worked in access and now
for some reason I can't get a simple statement to work! Help! What am I doing
wrong?
I took a date field, calculated month from it, which is a numerical value
and am now trying to translate it to quarter. What am I doing wrong?
Public Function getquarter(Mnth)
If Mnth = 1 Then getquarter = 1
ElseIf Mnth = 2 Then getquarter = 1
ElseIf Mnth = 3 Then getquarter = 1
ElseIf Mnth = 4 Then getquarter = 2
ElseIf Mnth = 5 Then getquarter = 2
ElseIf Mnth = 6 Then getquarter = 2
ElseIf Mnth = 7 Then getquarter = 3
ElseIf Mnth = 8 Then getquarter = 3
ElseIf Mnth = 9 Then getquarter = 3
ElseIf Mnth = 10 Then getquarter = 4
ElseIf Mnth = 11 Then getquarter = 4
ElseIf Mnth = 12 Then getquarter = 4
End If
End Function
Thanks!
-Victoria
(e-mail address removed)
for some reason I can't get a simple statement to work! Help! What am I doing
wrong?
I took a date field, calculated month from it, which is a numerical value
and am now trying to translate it to quarter. What am I doing wrong?
Public Function getquarter(Mnth)
If Mnth = 1 Then getquarter = 1
ElseIf Mnth = 2 Then getquarter = 1
ElseIf Mnth = 3 Then getquarter = 1
ElseIf Mnth = 4 Then getquarter = 2
ElseIf Mnth = 5 Then getquarter = 2
ElseIf Mnth = 6 Then getquarter = 2
ElseIf Mnth = 7 Then getquarter = 3
ElseIf Mnth = 8 Then getquarter = 3
ElseIf Mnth = 9 Then getquarter = 3
ElseIf Mnth = 10 Then getquarter = 4
ElseIf Mnth = 11 Then getquarter = 4
ElseIf Mnth = 12 Then getquarter = 4
End If
End Function
Thanks!
-Victoria
(e-mail address removed)