Hi,
I add two items to each line in a list box. The first is of variable lengths, the second is a date. It looks very messy and I would like to add spaces to the end of the first item (as many as required for each specific line) to align all the date values. Below is the code I am starting with - Can anybody help me with this? Thanks!
For intCounter = 0 To rs.RecordCount - 1
intFormatColumns = 25
intFormatColumns = (intFormatColumns - Len(rs!Name))
strTempString = rs!Name
lstBotLocs.AddItem strTempString
strTempString = strTempString & " : " & rs![Date]
lstBotLocs.AddItem strTempString
lstBotLocs.ItemData(intCounter) = rs!Bottle_LocationID
rs.MoveNext
Next intCounter
I add two items to each line in a list box. The first is of variable lengths, the second is a date. It looks very messy and I would like to add spaces to the end of the first item (as many as required for each specific line) to align all the date values. Below is the code I am starting with - Can anybody help me with this? Thanks!
For intCounter = 0 To rs.RecordCount - 1
intFormatColumns = 25
intFormatColumns = (intFormatColumns - Len(rs!Name))
strTempString = rs!Name
lstBotLocs.AddItem strTempString
strTempString = strTempString & " : " & rs![Date]
lstBotLocs.AddItem strTempString
lstBotLocs.ItemData(intCounter) = rs!Bottle_LocationID
rs.MoveNext
Next intCounter