Hi,
I have this test project;
The intent is to take a date entered in the editfield and test that
it is a Saturday. If it is then enter the long date in the
editfield. If it's nat a Saturday then do a msgbox and update the
entered date to the full shortdate.
The ultimate goal is to be able to enter the date and when going to
the next field validate the date entered.
I has two editfields and one pushbutton;
the following code if entered in the lostfocus field won't run. I
entered in the MouseDown of the Pushbutton it works fine.
Dim d As date
Dim s,t As string= ""
Dim b As boolean
s = editfield1.text
b=parsedate(s,d)
t=d.longdate
If InStr(t, "Saturday") = 0 then
MsgBox "That is not a Saturday"
t=d.shortdate // strip day off bad day
editfield1.text=t // update display to complete shortdate
else
// was a Sat., update display to a longdate
t=d.longdate
editfield1.text=t
end
Any clue what's wrong?
Tia,
Robert Poland
[EMAIL PROTECTED]
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>