I've got a form in access with a listbox and two textboxes. When you enter a name in the first box and a number in the second (say 35), a loop generates a string and adds each entrie to the listbox. For example adam-red1, adam-red2....on to 35. The thing is I want the entries to have a zero prefix (ie 01, 02, 03). Any ideas? Here's the loop I've got at the moment.
Thanks in advance
Adam
Code:
'************ Start Loop ************
intStartNum = 1
Do
strNewID = strPrefix & intStartNum 'add number to prefix
lstNewUsers.AddItem (strNewID & ";" & strPassword & ";" & strExpDate) 'add new ID to listbox
intStartNum = intStartNum + 1 'increment loop
Loop Until intStartNum = (intNumUsers + 1)
'************ End Loop ************
Thanks in advance
Adam