Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
if I want to get future date
previous dates are not to entertained then what should i do in vb6?
Posted

Set the MinDate[^] property of your date picker to today and the user can only pick dates in the future.

Answer to OP question:
To set the MinDate always to the current date use the Date function[^]. This ways the user at al times can only select dates in the future.
 
Share this answer
 
v2
Comments
rajinder raviya 28-Oct-11 8:56am    
thanks for replying
yes i have done it.
but i don't know in future what will happen?
either it will remain today date or that will get change according to that particular day of date.
André Kraak 28-Oct-11 9:04am    
Use the Date function to set the MinDate.
I updated the solution.
rajinder raviya 28-Oct-11 9:13am    
thanks i done it
Set the MinValue property on the date picker.
 
Share this answer
 
Comments
rajinder raviya 28-Oct-11 8:55am    
thanks for replying
yes i have done it.
but i don't know in future what will happen?
either it will remain today date or that will get change according to that particular day of date.
ChandraRam 28-Oct-11 8:56am    
Why not set the MinValue to the current date every time that form is loaded?
rajinder raviya 28-Oct-11 9:12am    
yeah k thanks
the another more accurate solution is =

dtpicker1.value=now
if dtpicker1.value<now then="">
msgbox("enter correct date")
end if
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900