Simple list box question

  • Thread starter Thread starter Rpettis31
  • Start date Start date
R

Rpettis31

I have a status notes box that the user clicks an add note button and the new
note should be listed in the listbox with the date. However I am only able
to get the date and the - to appear in the list box.

Private Sub cmdAddNote_Click()

Dim notes As String

Me.txtAddNote = notes

Me.lstStatusNotes.AddItem (date &" -" & notes)

End Sub
 
Rpettis31 said:
I have a status notes box that the user clicks an add note button and the
new
note should be listed in the listbox with the date. However I am only
able
to get the date and the - to appear in the list box.

Private Sub cmdAddNote_Click()

Dim notes As String

Me.txtAddNote = notes

Me.lstStatusNotes.AddItem (date &" -" & notes)

End Sub


It looks to me as if this line:
Me.txtAddNote = notes

should probably be this:

notes = Me.txtAddNote

That is, txtAddNote contains the note you want to add.

Or, you could just write this:

Private Sub cmdAddNote_Click()

Me.lstStatusNotes.AddItem date &" -" & Me.txtAddNote

End Sub
 
Back
Top