|
Jan
Interesting you can make this work - that means
clearly the problem is on my end.
Before entering the form, I
SET VAR fDR_StartDate DATE = NULL
SET VAR fDR_EndDate DATE = NULL
SET VAR fDR_StartDate = .#DATE
SET VAR fDR_EndDate = .#DATE
The form has only 4 controls (plus 3 text label controls for
information)
fDR_StartDate is a variable date time picker
fDR_EndDate is a variable date time picker
Search Button (bit button with on exit eep)
Cancel Button (bit button with on exit eep)
Tab order is:
fDR_StartDate
fDR_EndDate
Search bit button
Cancel bit button
This code is run on exit from the Search Bit Button:
IF fDR_EndDate < .fDR_StartDate THEN
BEEP PAUSE 1 USING + 'Ending Date must be on or after the Starting Date! + Click OK to try again.' + CAPTION .eMM_MTR_Caption + ICON INFO + OPTION BACK_COLOR WHITE + |MESSAGE_FONT_NAME Ariel + |MESSAGE_FONT_SIZE 10 + |MESSAGE_COLOR WHITE + |MESSAGE_FONT_COLOR BLUE + |BUTTON_COLOR WHITE + |THEMENAME Mac OS PROPERTY fDR_EndDate SET_FOCUS 'TRUE' PROPERTY fDR_EndDate COLOR 'RED' ELSE SET VAR fDoIt = 'Yes' CLOSEWINDOW ENDIF RETURN
When the end date is before the start date and I click on (or tab to and
press enter) the Search button, the error is trapped. After pressing OK
for the PAUSE box, the fDR_EndDate control's background turns red, but the focus
remains on the Search button. I can tell many ways, but the most clear is
that I ought to be able to start typing to chagne the date and I can't. I
have to either click on the fDR_EndDate control or hit Shift Tab or Left arrow
to get the focus there.
A puzzler! Anyone have a clue what I'm doing wrong?
David
----- Original Message -----
From: Jan
Johansen
Sent: Monday, May 02, 2005 4:08 PM
Subject: [RBG7-L] - Re: PROPERTY SET_FOCUS and Variable Date/Time
Picker David,
This one is a puzzler to me. I exported one of my 7.1 forms
with a date set focus in it to 7.5 so I could check this out.
My form works just fine. The date/time picker accepts the
SET_FOCUS command. It's in the exact same syntax that yours is (except I have
'TRUE' instead of 'True' but I tested that and it doesn't matter).
The only difference is I also issue a color command prior to
the set focus so I can see the focus.
Do you have anything else going on in your form? Is your PROPERTY command in the AFTER START section of the form? I
know a couple of times I've inadvertently placed the property command in the
wrong place. Do you issue the PROPERTY command from another object?
I don't know
Jan
|
- [RBG7-L] - Re: PROPERTY SET_FOCUS and Variable Date/Time ... David M. Blocker
- [RBG7-L] - Re: PROPERTY SET_FOCUS and Variable Date/... Jan Johansen
- [RBG7-L] - Re: PROPERTY SET_FOCUS and Variable Date/... David M. Blocker
- [RBG7-L] - Re: PROPERTY SET_FOCUS and Variable D... Jan Johansen
- [RBG7-L] - Re: PROPERTY SET_FOCUS and Variable D... David M. Blocker
