>>Spinning Through a Range of Dates, How To
>>
>>The project I'm working on is to produce an Employee Absenteeism report for a selected date range.
>>
>>I would like to be able to put Spinners on the Form and let the user either spin through the dates to choose beginning date and ending date, or type the dates in.
>>
>>But ... I'm still fairly new to Visual, and haven't done this before. The VFP Developer's Guide, p 279, says, '... if you want a user to be able to spin through a range of dates, you could size the spinner so that only the buttons are visible and position a text box beside the spinner buttons. Set the Value property of the text box to a date and in the UpClick and DownClick events of the spinner, increment or decrement the date.'
>>
>>I have indeed sized the spinner so that only the buttons are visible and positioned a text box beside the spinner buttons. I have set the value of the text box for the Beginning Date to Value=DTOC(DATE()-30). When I run the form, 'DTOC(DATE()-30)' is what shows up in the text box. Having ran into these problems I haven't put the text box for the Ending Date on the form as of yet.
>>
>>Would appreciate any help. TIA, CH.
>
>Initialize the value of text that handles the Date with DATE() at Init Event.
>
>This.Value = DATE() - 30
>
>At DownClick Event put:
>
>Thisform.txtDate.Value = Thisform.txtDate.Value - 1
>
>At UpClick Event put:
>
>Thisform.txtDate.Value = Thisform.txtDate.Value + 1
Jess,
Worked ... thanks. I was trying to make it too complicated. Thanks for the help. And sorry I didn't back to you until now ... have been feverishly trying to get this app done. Thanks Again, CH.
Chuck Henry