PDA

View Full Version : Solved: Spinbutton and date textbox



av8tordude
02-14-2011, 10:20 PM
I have a spinbutton that changes the date in a textbox (Date1). I'm using the code below to change the date by 1, but it will not allow me to decrease the date previous to the current date. Can some assist. Thank you

Date1.Value = Format(Date + SpinButton1, "mm/dd/yy")

Simon Lloyd
02-14-2011, 10:36 PM
A spin button doesn't allow for negative values, you could have a checkbox so that if it's checked the value of the spin button is deducted from the date.

av8tordude
02-14-2011, 10:46 PM
if the current date is 2/14/2011 it will not decrease the date to the previous date?

av8tordude
02-14-2011, 10:51 PM
ok..i was able to get the spinbutton to scroll the dates in reverse by changing the Min property value to -100.