ADD ITEMS TO LIST BOX ACCESS 2000

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

Hi, I want to be able to type in a value in a text box and
hit CMDADD to add it in the List Box(access doesnt have
the .additem function darn)..From there I run a
report based on those values in the list box(I got that
part) My problem is in access 2000 in vb how do u for
example add green to the list box then add Red..I dont
want to replace it..I want to add on to it. Please
Help..Thanks....
 
that's not what I want to do....I just want to be able to
use VB coding to add whatever I put in the text box to the
list box...thanks though
 
Do you realize that the value you add will not persist after the form has
been closed? If this is ok then add the text to the RowSource property of
the combo box

Private Sub txtTextToAdd_AfterUpdate()
If InStr(Me.cboColors.RowSource, Me.txtTextToAdd) = 0 Then
Me.cboColors.RowSource = Me.cboColors.RowSource & _
";""" & Me.txtTextToAdd & """"
End If
End Sub
 
Back
Top