Need to determine if a new quarter has started and check another table for validation
I have a form with a dropdown of names.
After i choose a name i need to perform a Date/quarter calculation.
and compare a value in another table.
quarter_table
fields:
id-autonumber
associate_name - text
q1 - text default = no
q2 - text default = no
q3 - text default = no
q4 - text default = no
So after a name has been chosen
What I need:
I need a function to check the Current date(todays date) and tell me the current quarter, q1,q2,q3,q4
If it is say "april 6th 2020"...the value to return would be "Q2"
Next:
so then i need to check the table "quarter_table" for that person. Look at the Column q2 and see if the entry is "NO"
if it is
need a message box to display "q2 = no"
I have a textbox on the form to tell me what
quarter it is:
Private Sub Text97_GotFocus()
Dim str As String
str = Format(Now, "q")
With Me.Text97
.Locked = False
If str = "1" Then
Me.Text97.Text = "Q1"
End If
If str = "2" Then
Me.Text97.Text = "Q2"
End If
If str = "3" Then
Me.Text97.Text = "Q3"
End If
If str = "4" Then
Me.Text97.Text = "Q4"
End If
.Locked = True
End With
End Sub
Thanks
fordraiders
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.