Thanks Bernie, I wish it were that easy. Some people prefer not to give a birth year, so I need to store the month and day with a dummy year - I'm going to use 1000. Granted, the user could key in the 1000 for those birthdates for which there is no year, but I prefer to do that programmatically as a step towards "user friendly" - the fewer exceptions and special cases the user has to remember, the better. I'll be using the same logic for anniversaries.

I think Tom Hawley's idea of a Variable Precision Date, VPDate, datatype has merit and second his suggestion.

BTW, there was an obvious error in my original post: "So the first error check is to make sure user enters an invalid month". No problem with them doing that; it should have read "..make sure user enters a _valid_ month."

Doug

Bernard Lis wrote:

Doug,
Why can't you use:  set var birth = (getdate('Enter Birth Date'))
Then they can't enter an invalid date.
But you should check for '[Esc]'

Bernie Lis

----- Original Message ----- From: "Doug Hamilton" <[EMAIL PROTECTED]>
To: "RBG7-L Mailing List" <[email protected]>
Sent: Monday, March 07, 2005 12:27 AM
Subject: [RBG7-L] - Can't get AutoSelect Property to work


I'm working on Date with Year Optional issue for which several people have offered very helpful suggestions. I'll post the final results soon.

Part of the effort is to make it goof-proof (yeah, right). I'm collecting the month, day and year in separate varialbles and then RDATEing them into a valid date. So the first error check is to make sure user enters an invalid month. If an invalid month is entered (> 12 at this time), I do a Pause error message and then set focus on the month variable control for re-entry. I would also like to have it Autoselect, as it does when user first tabs into it, so user doesn't have to delete the null symbol. But I can't get the Autoselect property to work. The following code is in an On Exit eep for the birth month variable control; vIndBirthMM is the integer variable defined before the form starts, BirthMM is the componentID. Autoselect is checked on the properties. I have also tried putting the Autoselect before the Set_Focus with no luck and tried moving the Autoselect to an On Entry eep, again with no luck. Any ideas?

IF vIndBirthMM > 12 THEN
   PAUSE 2 USING 'Invalid Month' +
     CAPTION 'caption' Button 'OK'

   SET V vIndBirthMM = NULL
   PROPERTY BirthMM SET_FOCUS 'true'
   PROPERTY BirthMM autoselect 'TRUE'
ENDIF

RETURN

Thanks much.
Doug
p.s.  Version 80.30228

--- RBG7-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, place any text to search for.
================================================








Reply via email to