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
|
|||
|
|||
Default Dates
I have a query that calculates records between two dates as
Between [Beginning Date] And [Ending Date] Is there a way to show a default value for the beginning and ending dates in the input boxes rather than having to enter a date every time? Thank you for any help Paul. |
#2
|
|||
|
|||
Default Dates
Yes. Open the form in design view, click on the text box, right click,
scroll to bottom, click on Properties, enter a default value or formula and select the format. -- Build a little, test a little. "Ampridge" wrote: I have a query that calculates records between two dates as Between [Beginning Date] And [Ending Date] Is there a way to show a default value for the beginning and ending dates in the input boxes rather than having to enter a date every time? Thank you for any help Paul. |
#3
|
|||
|
|||
Default Dates
No, there is no way to have a default date DISPLAYED. You can however have a
default date For instance to default to a range of Jan 1 of the current year to Dec 31 of the current year. Between Nz([Beginning Date],DateSerial(Year(Date()),1,1)) And NZ([Ending Date],DateSerial(Year(Date()),12,31)) You could change the parameter prompt to something like: [Beginning Date - Blank = Jan 1 Current Year] If you want defaults, the best way is to use a FORM to get the dates. You can set defaults for controls on a form. Check out this article for a detailed discussion. http://www.fontstuff.com/access/acctut08.htm Or check out this from MS http://office.microsoft.com/en-us/ac...730581033.aspx Or for another example http://allenbrowne.com/ser-62.html A brief quote from a John Vinson (Access MVP) posting. You'll need to create a small unbound Form (let's call it frmCriteria) with a Combo Box control (cboCrit) on it. Use the combo box wizard to select the table for the selections, and be sure that the bound field of the combo is the value you want to use as a criterion. Save this form. Now use =[Forms]![frmCriteria]![cboCrit] as the criterion in your Query. It's convenient to base a second Form or Report on the resulting query to display the results; if you put a button on frmCriteria to launch that form or report, the user can enter the criterion and view the results in one simple operation! End quote Keywords: Parameter Queries, comboboxes John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County Ampridge wrote: I have a query that calculates records between two dates as Between [Beginning Date] And [Ending Date] Is there a way to show a default value for the beginning and ending dates in the input boxes rather than having to enter a date every time? Thank you for any help Paul. |
Thread Tools | |
Display Modes | |
|
|