Normal Topic @Calendar Feature and ESC key (Read 723 times)
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
@Calendar Feature and ESC key
Nov 24th, 2005 at 10:59pm
Print Post Print Post  
Good Evening from snowy Toronto:

I am having a little difficulty with my programming such that if you do not select a date from the calendar and hit ESC, it wipes out the text in this date field.

I changed my programming to the following and ESC no longer wipes out the text, but I can't change the date either when I click on the calendar

var vLV as string

//POPS UP CALENDAR FOR LAST VISIT

vLV = LAST VISIT

LAST VISIT = @CALENDAR(@DATE, "Select a LAST VISIT DATE")


     If vLV <> "" Then
           {
                 LAST VISIT = vLV
           }

     ThrowFocus(REMARKS)

Any suggestions will help.

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: @Calendar Feature and ESC key
Reply #1 - Nov 24th, 2005 at 11:43pm
Print Post Print Post  
In your example, you set LAST VISIT to the value returned by @Calendar, but then check if the old value of LAST VISIT, as held in the variable vLV is not blank - and if it is not blank, overwrite the new value in LAST VISIT.

Try this:
Code
Select All
var vLV as string

vLV = @CALENDAR(@DATE, "Select a LAST VISIT DATE")
If vLV <> "" Then
{
  Last Visit = vLV
}
 



And - Happy Thanksgiving from across the lake in snowy Cleveland.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: @Calendar Feature and ESC key
Reply #2 - Nov 25th, 2005 at 2:47pm
Print Post Print Post  
I tried the code, but it still wipes out the information if you hit ESC.

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: @Calendar Feature and ESC key
Reply #3 - Nov 25th, 2005 at 3:00pm
Print Post Print Post  
Try:
Code
Select All
var vLV as string

vLV = @CALENDAR(@DATE, "Select a LAST VISIT DATE")
if(not @Error)
{
  If(vLV <> "")
  {
    Last Visit = vLV
  }
}
 

  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: @Calendar Feature and ESC key
Reply #4 - Nov 25th, 2005 at 5:48pm
Print Post Print Post  
Great !  Works very well

Thanks for your help Mark.

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
digimom1962
Junior Member
**
Offline


Natalie Gann

Posts: 92
Location: here
Joined: Nov 26th, 2004
Re: @Calendar Feature and ESC key
Reply #5 - Dec 2nd, 2005 at 3:32pm
Print Post Print Post  
And with the updated 1.1.3 it appears to work fine without programing.

~Natalie
  

So much time and so little to do . . . strike that, reverse it.
Back to top
YIM YIM  
IP Logged