|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Control displays null as zero (0)
I have a control populated by a procedure that can produce a null value. Under this circumstance I want the control to be blank but it displays a zero.
How can I force the control to display nothing if the value is null? Mike Collard |
|
#2
|
|||
|
|||
|
What kind of a control?
S- |
|
#3
|
|||
|
|||
|
I also ment to ask what type of object are you displaying it in and how is it formated, and what is the data type of the null value.
S- |
|
#4
|
|||
|
|||
|
Null displayed as zero
Now it gets complicated.
The control is a combobox that gets populated with the current value from a procedure that returns the value held in a table. The field is unformatted text. The user can change the value in the combobox and another procedure, triggered from the On_Click event of a Confirm button, saves the new value back to the table. The form that holds the combobox is not bound to the table that is ultimately going to be updated because it is necessary to store an effective and inactive date against each record and a standard data entry form does not cope with this. Hope this makes sense. Mike |
|
#5
|
|||
|
|||
|
Could you post a sample DB with the problem and I will look at it?
S- |
|
#6
|
|||
|
|||
|
Control shows null
Have had a couple of other suggestions in another forum - one that the controls property format may be set to display 0 for null - but it isn't. The other suggesting I use Nz(value,"") to send a zero length string to the control when it is populated - but that doesn't work either.
I have a partial solution thus: - The control is a combo with two columns bound to column 1 and I want the value of column 1 displayed when a selection is made. If the column width of column 1 is set to greater than zero then 0 is displayed if no selection has been made but if the column width of column 1 is set to zero then null is displayed with no selection. This is a partial solution but it means that when a selection is made the value of column 2 is displayed and I want to display the value of column 1! Hope you can follow this. Mike Collard |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Control displays null as zero (0) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|