G
Guest
In Access 2003 SP2
I created a combo box that displays folders. Using the AddItem method, every
other item is skipped. I cannot see why. Here is the code placed in the LOAD
event of the form:
Private Sub Form_Load()
' Ensure that the cboDirectories combo box gets list of
' available folders in the specified drive.
Dim mydir As String
mydir = Dir("S:\*.", vbDirectory)
' Don't bother adding first item as it is the root directory
Do Until Dir = ""
mydir = Dir
Me.cboDirectories.AddItem Item:="S:\" & mydir & "\"
Loop
End Sub
So ... if the S: drive contains the following directories:
ALC-Shared
EBB
ESC Building
FoodServ
Reorg
StudentServ
Tech
The combo box only displays:
ALC-Shared
ESC Building
Reorg
Tech
Thanks for any thoughts! It must be something amazingly obvious?
I created a combo box that displays folders. Using the AddItem method, every
other item is skipped. I cannot see why. Here is the code placed in the LOAD
event of the form:
Private Sub Form_Load()
' Ensure that the cboDirectories combo box gets list of
' available folders in the specified drive.
Dim mydir As String
mydir = Dir("S:\*.", vbDirectory)
' Don't bother adding first item as it is the root directory
Do Until Dir = ""
mydir = Dir
Me.cboDirectories.AddItem Item:="S:\" & mydir & "\"
Loop
End Sub
So ... if the S: drive contains the following directories:
ALC-Shared
EBB
ESC Building
FoodServ
Reorg
StudentServ
Tech
The combo box only displays:
ALC-Shared
ESC Building
Reorg
Tech
Thanks for any thoughts! It must be something amazingly obvious?