G
Guest
What I'm trying to do is have the Quarter field automatically update when the
Date Last Bid Sent info is entered. Date Last Bid Sent is in short date
format. Here is the code I've entered:
Private Sub Quarter_AfterUpdate()
If [Date_Last_Bid_Sent]("m") > 0 Then
[Quarter] = 1
ElseIf [Date_Last_Bid_Sent]("m") > 3 Then
[Quarter] = 2
ElseIf [Date_Last_Bid_Sent]("m") > 6 Then
[Quarter] = 3
ElseIf [Date_Last_Bid_Sent]("m") > 9 Then
[Quarter] = 4
End If
End Sub
But nothing happens. I have data already entered in the form, so I want this
code to be effective for any new record entered. Also, when I change the date
in one of the previous records, I want the quarter field to automatically
change. What am I doing wrong?
Date Last Bid Sent info is entered. Date Last Bid Sent is in short date
format. Here is the code I've entered:
Private Sub Quarter_AfterUpdate()
If [Date_Last_Bid_Sent]("m") > 0 Then
[Quarter] = 1
ElseIf [Date_Last_Bid_Sent]("m") > 3 Then
[Quarter] = 2
ElseIf [Date_Last_Bid_Sent]("m") > 6 Then
[Quarter] = 3
ElseIf [Date_Last_Bid_Sent]("m") > 9 Then
[Quarter] = 4
End If
End Sub
But nothing happens. I have data already entered in the form, so I want this
code to be effective for any new record entered. Also, when I change the date
in one of the previous records, I want the quarter field to automatically
change. What am I doing wrong?