Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Spinning Through a Range of Dates, How To
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00123958
Message ID:
00123964
Views:
17
>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 S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform