Normal Topic Warning: Converting to Blank (Read 975 times)
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Warning: Converting to Blank
Sep 19th, 2005 at 3:01pm
Print Post Print Post  
A user experienced an issue with a date formatted field that I was able to duplicate consistently.

They were updating a date in this field and accidentally typed the new info in front of the existing data, tabbed thru and the message came up:

Warning:  NEXT CALL cannot be retained with09/1809-17-2005.  Converting to blank.    OK

When you click OK, it freezes the database screen and you cannot manouevre around the form.  The only way to get out is to close the program thru the Task manager, even though it indicates that Sesame is running.

Has anyone experienced this ??

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Warning: Converting to Blank
Reply #1 - Sep 19th, 2005 at 4:04pm
Print Post Print Post  
Do you have programming that does something if that date is left blank?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: Warning: Converting to Blank
Reply #2 - Sep 19th, 2005 at 4:31pm
Print Post Print Post  
As a matter of fact, I do as follows:

//WARNS USER THAT NEXT CALL DATE MUST BE GREATER THAN LAST CALL DATE

IF NEXT CALL < LAST CALL THEN
{
     @MSGBOX("", "Date entered is earlier than the LAST CALL DATE.  Please verify !", "")
}

I assume this plays a part in my problem ?

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Warning: Converting to Blank
Reply #3 - Sep 19th, 2005 at 7:12pm
Print Post Print Post  
Very likely. It depends on which event this code is in. Try commenting it out and see if the problem still occurs. What is likely happening is that the invalid date can't be retained, so it gets blanked. At that point, your "trap" code throws you back at the blank date, where it pops the message again, and so on ad infinitum. This is the kind of thing you may want to verify On Form Exit, rather than trying to trap someone in a particular element.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: Warning: Converting to Blank
Reply #4 - Sep 19th, 2005 at 10:14pm
Print Post Print Post  
The programming was associated with On Element Exit.

I placed the code in On Form Exit and tested and it seems to wok fine the way you suggested.

However, it would be nice to keep the user within the record prior to the changes being made.

Is it possible to place programming within restrictions for a field i.e. in the Next Call Date field, placing a >Last Call Date in restrictions ?  I tried this but it didn't work.

Thanks for your input.

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Warning: Converting to Blank
Reply #5 - Sep 20th, 2005 at 12:07pm
Print Post Print Post  
That's the nice part about this technique.  You can use the NotifyForm flag to keep the user in the record. They can move freely around the record, but they can't actually save data unless it passes validation. This allows the user to do things in whatever order they want, but still maintains your data integrity.

Take a look at the GoTo and ThrowFocus section of the Advanced Programming coursebook. There are examples of this technique.

You're not in a DOS screen anymore. You are in a GUI. Control the data, not the user.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: Warning: Converting to Blank
Reply #6 - Sep 20th, 2005 at 12:51pm
Print Post Print Post  
Erika:

Bit by bit, the pieces of the puzzle start to make sense.

Thanks for the reference to the programming coursebook as I have now modified my programming to accomplish what I want as follows:

//CLEAR NOTIFY FLAG

     NotifyForm(0)

//WARNS USER THAT THE NEXT CALL DATE MUST BE GREATER THAN THE LAST CALL DATE

IF @MODIFIED
{
     IF NEXT CALL < LAST CALL THEN
           {
                 NotifyForm(1)
                 @MSGBOX("", "Date entered is earlier than the LAST CALL DATE.  Please verify !", "")
           }
}

Believe me - it's not the DOS environment that's holding me up, it's the lack of programming experience and knowing when to use certain functions & commands that I am trying to improve upon.

Thanks again,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Warning: Converting to Blank
Reply #7 - Sep 20th, 2005 at 2:08pm
Print Post Print Post  
There ya go!  Grin

  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged