Setting field to Null

  • Thread starter Thread starter Jon Borgeson
  • Start date Start date
J

Jon Borgeson

I am using Visual Basic to set an event AfterUpdate on a
combo box in my form. If a condition is met I want to
remove any existing value from a different combo box in
the same form (Combo2). Combo2 is based on a set of
values in a table where the fields are "Text". The list
is limited to only the values from the table.

I have tried to set Combo2 equal to Null but the routine
fails (I suppose because it is a text string?). I have
also tried empty double quotes ("") but that fails.

How can I remove the value from the form field Combo2?
 
-----Original Message-----
I am using Visual Basic to set an event AfterUpdate on a
combo box in my form. If a condition is met I want to
remove any existing value from a different combo box in
the same form (Combo2). Combo2 is based on a set of
values in a table where the fields are "Text". The list
is limited to only the values from the table.

I have tried to set Combo2 equal to Null but the routine
fails (I suppose because it is a text string?). I have
also tried empty double quotes ("") but that fails.

How can I remove the value from the form field Combo2?
.
Hi Jon,

try ...

with combo2
..value=.itemdata(-1)
end with

luck
Jonathan
 
Back
Top