Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Numeric Field Show Blanks
Message
De
25/03/1998 07:54:45
 
 
À
25/03/1998 05:56:23
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00086726
Message ID:
00086960
Vues:
32
>>>>>>I have several txtFlds on a form that the controlsource fields are tied to numeric fields. When I create a new record and display the form the fields show blank instead of zeros.
>>>>>>
>>>>>>I set the txtFld.InputMask = 9999.9, txtFld.Format = K, and
>>>>>>txt.FldValue = 0.0 The controlsource = tbl.fldname
>>>>>>
>>>>>>What am I missing?
>>>>>If using buffering, new records have .null. instead of 0. You could try "set nulldisplay" but it would work for text too.
>>>>>Cetin
>>>>
>>>>if fields accept null values, right?
>>>But Dave wouldn't that be important when tableupdate() ? I mean if table doesn't accept nulls, I can still append blank, values are null at the moment, must be filled before update. Isn't this true ?
>>>Cetin
>>
>>that was my question. if field doesn't accept null values, what happens when you append blank? blank (zero for numeric) or null?
>
>Hi Dave,
>I was wrong at some point.
>-Append blank, append a record with all values initialized to a blank value (not .null.).
>-Set null effect SQL commands - create table, alter table, insert.
>Set null off (default)- Do not allow null. insert into ... would initialize all to blank values.
>Set null on - Allow nulls. insert into ... would initialize any field not included in insert list to .null. others blank values (would generate error if field doesn't accept nulls).
>Now for original question :
>-Nulldisplay property would effect the display. If default textbox would show .NULL.
>"txtFld.InputMask = 9999.9, txtFld.Format = K, and txt.FldValue = 0.0 The controlsource = tbl.fldname"
>-txt.FldValue has no effect because controlsource determine the value
>So I wonder if :
>-controlsource is not a numeric type (-Stated tied to num fields though) ?
>-Format also has "Z" ? (If a class changing format in init ?)
>Cetin


The controlsource is accessing N(6,0) field. If I SCATTER TO laNew BLANK then INSERT INTO tblname FROM ARRAY laNew, the problem is resolved and all numeric fields on screen show a 0 or 0.0 depending on the field's definition. But if I use INSERT INTO tblname (code) VALUES (lcCode) the numeric fields show up blank on the form. I wished there was a set command to control how numeric fields are displayed if they are nulls. Thanks for your help.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform