View Full Version : List Box


naygl
03-07-2002, 04:25 PM
I have a list box with three columns. I want to change the data in the third column by double clicking on a row then choosing 'yes' in a message box that pops up.
It's a yes/no field. So far I have:

If MsgBox("Do you wish to change Technician Status for " + Me.List19.Column(1), vbYesNo) = vbYes Then
If List19.Column(2) = 0 Then
List19.Column(2) = 1

Else
List19.Column(2) = 0
End If

End If

Which doesn't work. What do I do?


[This message has been edited by naygl (edited 03-07-2002).]

Elana
03-08-2002, 02:15 PM
Are you getting an error message or is nothing happening?

boblarson
03-09-2002, 12:20 AM
Sorry, but to change a column in a list box, you would need to update or change the RowSource property.

Without playing with it I can't tell you how to make it do what you want right now, but maybe with that other info you can get on the right track.

Also, when concatenating fields, it is better to use & instead of + to be consistent as you cannot use the + to concatenate numeric fields. So, it's good programming practice to leave the + operator to arithmetic functions.

BL
hth