Here's a puzzler. I've got a workaround but I cant' quite understand what's happening.
On my main menu, lower right corner in large font I have today's date. I want it to display as August 21, 2004 (date format MMM+ DD, YYYY) all the time. Unlike in a report, there's no format option on a variable label control to suppress the leading zero - so if I use the default for forms, MM/DD/YYYY, it shows as 08/21/2004 - I can't suppress the leading zero. So I placed a variable label, set to #DATE. In the code right before the main menu form comes up, I have SET DATE FORMAT 'MMM+ DD, YYYY'. I noticed that I had to do this OUTSIDE the form: placing it in EEP's IN the form had NO effect on the way the variable was formatted: apparently R:Base decides this when the form comes up BEFORE the eeps and the eeps have no effect. BUT - when I select a menu item from the form, to, say, edit an invoice, on THAT form I need the date format to be MM/DD/YYYY. No problem - the code that runs is an EEP stored with the form: it sets the date format to MM/DD/YYYY and when the invoice form comes up, the dates show in the correct format. In the backgkround, you can see today's date the whole time on the main menu, showing as August 21, 2004. BUT, when I end this menu item, EVEN THOUGH IN THE EEP I RESET THE FORMAT TO MMM+ DD, YYYY, when the EEP executes a RETURN to go back to the form, you can see the date CHANGE to 08/21/2004. The strange thing is, that on the form, there is a lookup of a date in a table and this STAYS in the correct format. Only #DATE changes. The workaround I've used is in the program RBASE.DAT calling the main menu, I used SET VAR fToday TEXT = NULL SET VAR fToday = (CTXT(.#DATE)) and place THAT on the form. Of course, the one fly in this ointment is if by some chance a poor soul was working past midnght, they wouldn't see the date change! Any ideas? David Blocker [EMAIL PROTECTED] 781-784-1919 Fax: 781-784-1860 Cell: 339-206-0261
