Emil Karlen wrote:
Hi,
I am using a listbox in a form bound to a database table. I want one
listitem to NULL values in the column (an integer column).
I am using predefined listitems, so type of list content is set to "value
list" and the values are specified in "list content".
I have tried the string "$$$empty$$$" but that stores a zero in the column.
Does anyone know how to do this? If so, please help!
/Emil
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hey Karlen,
Not sure if there is a better way, but here is how I do it.
I use a string in the list as a flag. Your string "$$$empty$$$" would be
fine. Then I assign the event 'Item Status chantged' to a basic macro,
the macro checks for this flag and if so sets the bound filed property
to NULL.
The macro can be as simple as this:
const cNullFlag ="$$$empty$$$"
sub setlbFieldNull( oEv as variant )
if oEv.Source.SelectedItem = cNullFlag then
oEv.Source.Model.BoundField.setNull
end if
end sub
HTH
Drew
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]