Providing default values in user prompt

mik

Lost in a VBA Jungle
Local time
Today, 13:49
Joined
Nov 16, 2004
Messages
22
Hi, I want to provide the end user a default value when prompted as in most cases the user will be using the default.

SELECT Customer_Name, Customer_Start_Date
FROM Customer
Where Customer_Start_Date >= [Enter Start Date (dd/mm/yyyy)];

Will bring up a blank prompt for the user to enter the. Is there a way that the date prompt can be defaulted?
 
Set a default if message prompt returns a Null.
 
Default Date is left blank

Thanks llkhoutx,

Good suggestion, all the user has to do is click OK

Got it working with the following syntax;

>=IIf([start date (dd/mm/yyyy)] Is Null,CDate('01/01/2000'),[start date (dd/mm/yyyy)]) And <=IIf([end date (dd/mm/yyyy)] Is Null,CDate('01/01/2010'),[end date (dd/mm/yyyy)])

(yes I know I could of used between)

If both prompts are clicked 'OK' without filling in, then it defaults to the range 1/1/00 thru 1/1/10
 

Users who are viewing this thread

Back
Top Bottom