Setting field to Null

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

Jonathan

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top