Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

USE A SPINNER FOR "DATE RANGE" ?

Status
Not open for further replies.

Stagmotor

Programmer
Dec 8, 2000
10
US
I would like to sort records in a grid by date using a spinner. There are 2 different ways I would like to do it.

First way:

The spinner would have a default date and with each click the date would go back a day or forward a day.


Second way (more difficult):

The spinner would have a default date and with each click I want to change only the month, or only the day, or only the year. An example of this is in the way Windows lets you change the time on your computer.

What would be the steps ????

Thanks for any help.
Stagmotor
 
Stagmore,
Assuming you are trying to "filter" the records by the date in your spinner(s), all you need to do is create a parameterized view based on the date value, and make it the record source of your grid. You'll just need to requery and then refresh the grid when the spinner value changes.

Rick
 
Rqbean,

I understand what you said. My problem is how do you change the "spinner value" back & forward if the spinner value is a date ?
 
Go to the UT ( - after you log on (registration is free), choose "Files", then "Classes - VCX", then down to #001018 "CoolDate" by Doug Ringley. It has a date spinner / popup calendar control, that should give you some ideas on how to do what you want.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top