Hello, I have on a form several multiple selection list boxes (multi-select type extended) which several members of this website have helped me on. The listbox has an afterupdate code which passes its selection onto the field [Reprint Edition]:
Private Sub List48_AfterUpdate()
If .Selected(.ListIndex) = True Then
If rst = "" Then
rst = .Column(0, .ListIndex)
If InStr(rst, .Column(0, .ListIndex)) = 0 Then
rst = rst & ", " & .Column(0, .ListIndex)
If InStr(rst, ",") > 0 Then
If InStr(rst, .Column(0, .ListIndex)) = 1 Then
rst = Replace(rst, .Column(0, .ListIndex) & ",", "")
rst = Replace(rst, "," & .Column(0, .ListIndex), "")
rst = ""
Me.[Reprint Edition] = rst
I want to limit this to only 1 selection. I tried setting the box type to no multi-select via the properties menu for the list box, but this resulted in none of the selections being transferred to [reprint edition]. Could anyone help edit the above code to make this work?
Thanks so much,