Search form for quarters and years (1 Viewer)

deehutchins

Registered User.
Local time
Today, 10:37
Joined
May 30, 2014
Messages
49
Good morning,

I am trying to create a macro to search for selected quarters and entered years. I have a form that asked for quarters and years, in the section quarters there is a combo box that list Q1, Q2, Q3, and Q4 in which the users have to select from. And then there is a textbox that request users to enter in the years in which is saved to a table. I have created a search section that I need to create a macro search to look in the table and pull into the form the saved data that was selected based on the selected quarters and years.

I had a macro similar to this before and hoping that maybe I could just edit it to match for the quarter and year search.

Here is my old macro code: ="[Report] = " & "#" & Format([Screen].[ActiveControl],"mm/dd/yyyy") & "#"


PLEASE HELP!

Thanks,
 

llkhoutx

Registered User.
Local time
Today, 12:37
Joined
Feb 26, 2001
Messages
4,018
Test for year or for quarters, in the latter case use the Between function.
 

namliam

The Mailman - AWF VIP
Local time
Today, 19:37
Joined
Aug 11, 2003
Messages
11,695
Returns the quarter
format(date(), "Q")

To get the year
format(date(), "YYYY")

NOTE you dont need the # tags, those are only needed for date fields, these become numbers, numbers dont need any tags.
 

Users who are viewing this thread

Top Bottom