Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jamie Osborn
  Where is Jamie Osborn?
 Melbourne
 Australia
 Jamie Osborn
 To: Adhémar Van Acker
  Where is Adhémar Van Acker?
 Aalter
 Belgium
 Adhémar Van Acker
 Tags
Subject: RE: Keystroke(s) for NULL
Thread ID: 16252 Message ID: 16282 # Views: 0 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Tuesday, October 15, 2002 6:57:15 PM         
   


> > > Hi Jamie,
> > > It is a program for school- and test evaluation. I need the null value in the calculations!!! because there must be a difference between a zero result and not made the test or absent. So in the grid all tests of all the students start with a null value represented by an asterisk in the grid. When the teacher writes down the results, it may happen that he is mistaken and that he writes down a result on the place of an absent student. He will try to restore the asterisk, but the computer does ntot accept the asterisk (certainly not as a null value) he has to use CTRL+0. The null value is really very useful for my calculations!!!
> > > Regards
> > > Adhémar Van Acker
> >
> > Can't you use some kind of field protection instead, so that the teacher can't even change a null/asterisk value? I think you can do it by changing the When event:
> >
> > *grid.column.textbox.when
> > * something like the following untested line
> > RETURN NOT (this.value = "*")
> > 

> > --
> > Eric den Doop
> > www.foxite.com - The Home Of The Visual FoxPro Experts
>
> Yes I could but the teacher must be able to fill in his results and by doing so he is changing the null values in a numeric value.
> I return to my initial question: is it possible to make another keystroke( in my case an asterisk) than CTRL+0 to fill in a null value????

Besides ON KEY LABEL you can use the Keypress event to handle it for your grid column specifically.

In the Keypress event of the textbox of the grid column in question :
IF nKeyCode = 42
  This.Value = .NULL.
  NODEFAULT
ENDIF


Cheers,
Jamie
jamie.osborn@foxite.com

ENTIRE THREAD

Keystroke(s) for NULL Posted by Adhemar Van Acker @ 10/14/2002 10:40:42 AM
RE: Keystroke(s) for NULL Posted by Jamie Osborn @ 10/15/2002 1:50:03 AM
RE: Keystroke(s) for NULL Posted by Adhemar Van Acker @ 10/15/2002 9:45:41 AM
RE: Keystroke(s) for NULL Posted by Eric den Doop @ 10/15/2002 11:42:25 AM
RE: Keystroke(s) for NULL Posted by Adhemar Van Acker @ 10/15/2002 12:30:15 PM
RE: Keystroke(s) for NULL Posted by Suvi Joseph @ 10/15/2002 2:35:25 PM
RE: Thanks Posted by Adhemar Van Acker @ 10/15/2002 4:16:13 PM
RE: Keystroke(s) for NULL Posted by Jamie Osborn @ 10/15/2002 6:57:15 PM
RE: Keystroke(s) for NULL Posted by Adhemar Van Acker @ 10/16/2002 7:37:52 PM
RE: Keystroke(s) for NULL Posted by Adhemar Van Acker @ 10/16/2002 7:37:54 PM