Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AGHHH... NULL VALUE???
Message
 
À
21/02/2001 12:46:36
Bob Lucas
The WordWare Agency
Alberta, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00478029
Message ID:
00478501
Vues:
24
Hi Bob,

Thanks for your suggestion, but unfortunately it didn't work.

I am sure that I am doing something wrong and cannot see it.

Here is the code in the browse screen:

SET TALK OFF
SET MESSAGE OFF
SET SAFETY OFF
INDEX ON fieldname to file
SET INDEX TO file
SEEK array
IF FOUND()
? ISNULL(field)
BLANK FIELDS field
THISFORM.REFRESH
ELSE
LOCATE FOR m.memvar=field WHILE field=array REST
END IF
THISFORM.REFRESH

when this code runs, the record is located, however upon seeking the second value it is displaying some fields with correct information and some fields with wrong information.

any thoughts? thanks and have a good day.

Becky

>You shouldn't use an = sign for NULLS. NULL does not equal NULL. Something that is undetermined cannot equal something else that is undetermined.
>
>Best to use
>IF ISNULL(field)
> BLANK Field
>ELSE
> Thisform.refresh
>ENDIF
>
>
>>VFP 3.0
>>
>>Hello All,
>>
>>I have a weird one here folks....ok here goes
>>
>>I have a browse form...when the form opens it searches the dbf for
>>a number, locates the record, then continues to search the dbf for
>>another field that is a character field, once it is located the record
>>displays and everyone signs happy happy joy joy.
>>
>>The problem is the second field, when the value is .null the dbf displays
>>the wrong record.
>>
>>I know i have to do something about the null and have tried to no avail.
>>
>>any thoughts? I am thinking something like this..
>>
>>IF field=.null.
>>BLANK field
>>ELSE
>>THISFORM.REFRESH
>>
>>Thanks and have a good day.
>>
>>Becky
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform