Odd. Except for a bit of interaction between the MsgBox and
Window1.EditField1.LostFocus, it works for me.
The LostFocus fires (at least once), and the code runs correctly,
either from the pushbutton or from the LostFocus.
RB 2006r3 MacOS 10.4.7
Russ
On Aug 10, 2006, at 3:14 PM, Robert Poland wrote:
Oops, forgot the subjecy
On Aug 10, 2006, at 11:51 AM, Robert Poland wrote:
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>