combo box if statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In my database i have a coombo box that contains 4 entries. This box is
called type. I also have a text box below called scent9 and i want a certain
name to be put in this text box when one of the 4 entries in the combo box is
selected. I need this to happen when the combo box slection changes.
I have used the folowing code
if type = "SAVE" then
scent9 = "SAVE"
else
scent9 = "Apple"
end if

I know this will be something very easy to solve, so I hope someone will be
able to assist me with this problem.

Thanks
 
jr012 said:
In my database i have a coombo box that contains 4 entries. This box is
called type. I also have a text box below called scent9 and i want a certain
name to be put in this text box when one of the 4 entries in the combo box is
selected. I need this to happen when the combo box slection changes.
I have used the folowing code
if type = "SAVE" then
scent9 = "SAVE"
else
scent9 = "Apple"
end if

I know this will be something very easy to solve, so I hope someone will be
able to assist me with this problem.


Assuming the names of the controls are correct, I don't see
a problem. Your code looks good to me.

If the question is where to put it, then place it in the
combo box's AfterUpdate event procedure.
 
Back
Top