MS Access 2000 Query Default Values
Category: Computers > Software
Asked by: sjkistler-ga
List Price: $10.00
12 Feb 2003 07:20 PST
Expires: 14 Mar 2003 07:20 PST
Question ID: 160425
Running MS Access 2000 In a query, I want to prompt the user for a specific date, have entered the following in the criteria line: >[Earliest renewal date to include?]. This works fine. However, I would like the default date to be 30 days prior to the current date, but I can't figure out how to enter a default date into the message box (and how to make that date 30 days prior to current date). How?
Re: MS Access 2000 Query Default Values
Answered By: hammer-ga on 12 Feb 2003 10:18 PST
The only way to do this without using a form is to use the following as your criteria: IIf(IsNull([Earliest renewal date to include?]),Date()-30,[Earliest renewal date to include?]) This will offer the criteria popup. If the box is left blank, the IsNull test comes True, and the criteria will use the default of Date() - 30. Otherwsie, it will use the value entered. This will cause the query to use today's date - 30 days, if the box is left blank. There is no way to make the default date prefill in the parameter box. You may be able to reword to indicate this, but space is limited. If you change the prompt, make sure you change it in both arguments. - Hammer Search Strategy: Google Groups Access default criteria query
|sjkistler-ga rated this answer:|
|There are no comments at this time.|
If you feel that you have found inappropriate content, please let us know by emailing us at firstname.lastname@example.org with the question ID listed above. Thank you.
|Search Google Answers for|