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
|
|||
|
|||
How do I set a default for the whole year
I have developed a program that contains a lot of controls that are on forms
and reports along with queries that require a criteria for the year. For example, a query might have a field with a criteria for Year=2006. When the new year starts I want the user to be able to select a pulldown on a form somewhere that is hidden and select the year. This pulldown control would be the criteria for all my controls and queries throughout the program for that year. Can anyone offer some advice as to how I would do this. Thank You |
#2
|
|||
|
|||
How do I set a default for the whole year
why not simply have the current year default in?
=Format(Date(),"YYYY") -- Rick B "Jon" wrote in message ... I have developed a program that contains a lot of controls that are on forms and reports along with queries that require a criteria for the year. For example, a query might have a field with a criteria for Year=2006. When the new year starts I want the user to be able to select a pulldown on a form somewhere that is hidden and select the year. This pulldown control would be the criteria for all my controls and queries throughout the program for that year. Can anyone offer some advice as to how I would do this. Thank You |
#3
|
|||
|
|||
How do I set a default for the whole year
Because, for a few days or weeks even, at the beginning of the new year ,
the program still needs to work for the previous year, UNTIL they start the new project for the current year. does this make any sense? "Rick B" Anonymous wrote in message ... why not simply have the current year default in? =Format(Date(),"YYYY") -- Rick B "Jon" wrote in message ... I have developed a program that contains a lot of controls that are on forms and reports along with queries that require a criteria for the year. For example, a query might have a field with a criteria for Year=2006. When the new year starts I want the user to be able to select a pulldown on a form somewhere that is hidden and select the year. This pulldown control would be the criteria for all my controls and queries throughout the program for that year. Can anyone offer some advice as to how I would do this. Thank You |
#4
|
|||
|
|||
How do I set a default for the whole year
Yes, but I said why not DEFAULT it. They could still type over it.
-- Rick B "Jon" wrote in message ... Because, for a few days or weeks even, at the beginning of the new year , the program still needs to work for the previous year, UNTIL they start the new project for the current year. does this make any sense? "Rick B" Anonymous wrote in message ... why not simply have the current year default in? =Format(Date(),"YYYY") -- Rick B "Jon" wrote in message ... I have developed a program that contains a lot of controls that are on forms and reports along with queries that require a criteria for the year. For example, a query might have a field with a criteria for Year=2006. When the new year starts I want the user to be able to select a pulldown on a form somewhere that is hidden and select the year. This pulldown control would be the criteria for all my controls and queries throughout the program for that year. Can anyone offer some advice as to how I would do this. Thank You |
#5
|
|||
|
|||
How do I set a default for the whole year
Thanks very much for the help Rick,
But I mustn't have been clear in my explanation. Not unheard of... or am not understanding your suggestion. I gather yau are suggesting that I put =Format(Date(),"YYYY") in the criteria for EACH of the form & report controls along with all the different queries field criteria. Let me try my explanation again. The forms & reports have recordsources with a field "ProductionYear" throughout the program. Currently these field's criteria is SET to "PRD2005". The users don't see this field anywhere in the program. In the past, when they would ask me to set the program for the next years procject I would go thru each of the forms, reports and querries to set the criteria in that field to "PRD2006". I'm looking for a way wherby the Administrator could set this criteria in ONE place and have all the field criteria set to that control for the rest of the year. I was thinking of a small hidden form with a pulldown, but when the user exits the database and gets back in that control has to be set again. I want to be able to "set it & forget it" so to speak. Instead of me having to go into each form, report, query at the beginning of each year when they are ready to start the new project just to set the "ProductionYear". I hope this explanation make better sense. "Rick B" Anonymous wrote in message ... Yes, but I said why not DEFAULT it. They could still type over it. -- Rick B "Jon" wrote in message ... Because, for a few days or weeks even, at the beginning of the new year , the program still needs to work for the previous year, UNTIL they start the new project for the current year. does this make any sense? "Rick B" Anonymous wrote in message ... why not simply have the current year default in? =Format(Date(),"YYYY") -- Rick B "Jon" wrote in message ... I have developed a program that contains a lot of controls that are on forms and reports along with queries that require a criteria for the year. For example, a query might have a field with a criteria for Year=2006. When the new year starts I want the user to be able to select a pulldown on a form somewhere that is hidden and select the year. This pulldown control would be the criteria for all my controls and queries throughout the program for that year. Can anyone offer some advice as to how I would do this. Thank You |
#6
|
|||
|
|||
How do I set a default for the whole year
It looks like you need a global variable called for example
glb_ProductionYear. Create a function that fetches the value of this global variable, call it GetProductionYear(). You'll need to modify all your queries. For example, you might need to add a clause WHERE ProductionYear=GetProductionYear() in all your queries. Have your function fetch the value from a hidden form or even from a table. It's up to you. Ray Jon wrote: Thanks very much for the help Rick, But I mustn't have been clear in my explanation. Not unheard of... or am not understanding your suggestion. I gather yau are suggesting that I put =Format(Date(),"YYYY") in the criteria for EACH of the form & report controls along with all the different queries field criteria. Let me try my explanation again. The forms & reports have recordsources with a field "ProductionYear" throughout the program. Currently these field's criteria is SET to "PRD2005". The users don't see this field anywhere in the program. In the past, when they would ask me to set the program for the next years procject I would go thru each of the forms, reports and querries to set the criteria in that field to "PRD2006". I'm looking for a way wherby the Administrator could set this criteria in ONE place and have all the field criteria set to that control for the rest of the year. I was thinking of a small hidden form with a pulldown, but when the user exits the database and gets back in that control has to be set again. I want to be able to "set it & forget it" so to speak. Instead of me having to go into each form, report, query at the beginning of each year when they are ready to start the new project just to set the "ProductionYear". I hope this explanation make better sense. Yes, but I said why not DEFAULT it. They could still type over it. [quoted text clipped - 14 lines] throughout the program for that year. Can anyone offer some advice as to how I would do this. Thank You -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200602/1 |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Default Value To Be Entered On a Form | Jeff Garrison | Using Forms | 3 | August 18th, 2004 02:47 PM |
Add a FIXED MONTH and DAY with the CURRENT YEAR | texcel | General Discussion | 1 | June 23rd, 2004 01:36 AM |
Default Printer Problems | Ella | Setting Up & Running Reports | 1 | June 7th, 2004 12:01 AM |
Combining two queries or two different table on a same report . | sha | Setting Up & Running Reports | 7 | May 28th, 2004 10:41 AM |
IIF statement for Last Fiscal Year | Liz | New Users | 5 | May 18th, 2004 07:02 PM |