>>>>>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