Article ID: 136666
Article Last Modified on 2/15/2000
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.
BackStyle = 0 - Transparent BorderWidth = 0 Height = 24 Width = 164
FontName = Courier New && Or any nonproportional font FontSize = 9 Format = k && Highlights the text box when the focus gets set to it. Height = 22 Left = 0 ReadOnly = .T. && Keeps the user from editing the text box Top = 1 Width = 148
THIS.Value = PADR(CDOW(DATE()),11) + DTOC(DATE()) ** This puts current day and date in the text box when the form starts
FontSize = 1 Height = 24 Left = 146 Top = 0 Width = 18
dMyDate = CTOD(RIGHT(ALLTRIM(THIS.PARENT.Text1.Value),8)) ** Gets the Date from the text box dMyDate = dMyDate - 1 && Decrease the date by one THIS.PARENT.Text1.Value = PADR(CDOW(dMyDate),11) + DTOC(dMyDate) **Stores the new day of the week and date back into the text box THIS.PARENT.Text1.SetFocus
dMyDate = CTOD(RIGHT(ALLTRIM(THIS.PARENT.Text1.Value),8)) ** Gets the Date from the text box dMyDate = dMyDate + 1 && Increment the date by one THIS.PARENT.Text1.Value = PADR(CDOW(dMyDate),11) + DTOC(dMyDate) **Stores the new day of the week and date back into the text box THIS.PARENT.Text1.SetFocus
Additional query words: VFoxWin
Keywords: KB136666