Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numeric Field Show Blanks
Message
From
25/03/1998 07:54:45
 
 
To
25/03/1998 05:56:23
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00086726
Message ID:
00086960
Views:
31
>>>>>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform