combo box - reverting to default value

  • Thread starter Thread starter sue_in_oz
  • Start date Start date
S

sue_in_oz

apologies if this has been answered before - i've had a
look through the board but can't see it. also apologies
for length of post.

i have a form used for data entry with a number of
controls. for 1 question i have yes/no radio buttons,
some text boxes & a combo box (all bound).

if the answer is yes the text boxes & combo box are
enabled, if the answer is no the text boxes & combo box
remain disabled. if the user had already typed something
in these text boxes they are cleared as well.

all this works well (well, nearly), i'm using the value ?
method to reset the text boxes to null eg
Me.strText.Value = "". however this doesn't work for the
combo box. my question (finally) is how do i get the
combo box (& underlying table field) to revert to the
default value of ""?

many many thanks

sue
 
sue_in_oz said:
apologies if this has been answered before - i've had a
look through the board but can't see it. also apologies
for length of post.

i have a form used for data entry with a number of
controls. for 1 question i have yes/no radio buttons,
some text boxes & a combo box (all bound).

if the answer is yes the text boxes & combo box are
enabled, if the answer is no the text boxes & combo box
remain disabled. if the user had already typed something
in these text boxes they are cleared as well.

all this works well (well, nearly), i'm using the value ?
method to reset the text boxes to null eg
Me.strText.Value = "". however this doesn't work for the
combo box. my question (finally) is how do i get the
combo box (& underlying table field) to revert to the
default value of ""?

many many thanks

sue


If the purpose of the No answer is to abort the currently started
entry, rather than setting the textbox values to Null or "", try using
Me.Undo instead. By the way Null is not the same as a zero length
string "".

hth

Hugh
 
Back
Top