If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
filter by current month name
Hi,
I have a table with transactions that has a field called FiscalMonth that has the name of a month in it (i.e. October). I want to run a query that will always give transactions for the current fiscal month on a rolling basis. Can someone help? Thanks, -- Chuck W |
#2
|
|||
|
|||
filter by current month name
Use this as criteria --
Format(Date(), "mmmm") Of course you know this method will mix 2007 and 2008 data of the same month. -- KARL DEWEY Build a little - Test a little "ChuckW" wrote: Hi, I have a table with transactions that has a field called FiscalMonth that has the name of a month in it (i.e. October). I want to run a query that will always give transactions for the current fiscal month on a rolling basis. Can someone help? Thanks, -- Chuck W |
#3
|
|||
|
|||
filter by current month name
On Mon, 27 Oct 2008 08:46:15 -0700, ChuckW wrote:
Hi, I have a table with transactions that has a field called FiscalMonth that has the name of a month in it (i.e. October). I want to run a query that will always give transactions for the current fiscal month on a rolling basis. Can someone help? Thanks, One quick question: how is your fiscal month defined? Format(Date(), "mmmm") will give the current calendar month name, but if your fiscal November starts on October 29 you'll get the wrong data. -- John W. Vinson [MVP] |
#4
|
|||
|
|||
filter by current month name
John,
I don't have a field that has a date value in my table. I only have a field called fiscal month and it is a text value (January, February, March etc.). The table only has 2008 transactions and next year, a new table will be created. So I want to run a query that will return transactions where the FiscalMonth field is equal to October. When fiscal November starts, the query needs to pull only records that have November in this field. Thanks, -- Chuck W "John W. Vinson" wrote: On Mon, 27 Oct 2008 08:46:15 -0700, ChuckW wrote: Hi, I have a table with transactions that has a field called FiscalMonth that has the name of a month in it (i.e. October). I want to run a query that will always give transactions for the current fiscal month on a rolling basis. Can someone help? Thanks, One quick question: how is your fiscal month defined? Format(Date(), "mmmm") will give the current calendar month name, but if your fiscal November starts on October 29 you'll get the wrong data. -- John W. Vinson [MVP] |
#5
|
|||
|
|||
filter by current month name
On Mon, 27 Oct 2008 13:21:01 -0700, ChuckW wrote:
John, I don't have a field that has a date value in my table. I only have a field called fiscal month and it is a text value (January, February, March etc.). The table only has 2008 transactions and next year, a new table will be created. So I want to run a query that will return transactions where the FiscalMonth field is equal to October. When fiscal November starts, the query needs to pull only records that have November in this field. Thanks, My suggestion has nothing to do with a date field in the table. A criterion on the field of =Format(Date(), "mmmm") will look at the computer clock, determine today's date, and format it as the name of a month. That is, if you use this as a criterion in a query run today, it will find all records where the FiscalMonth is equal to "October"; if you run it this coming Wednesday, it will find "November". If you want the computer to automatically determine the name of the current fiscal month, as of today, you will have to tell us how you calculate the fiscal month. You haven't said, and nobody here can possibly know. -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|