Automatically add lettered directories to a combox box ACCESS 2003

Posted on 2013-09-03
Medium Priority
Last Modified: 2013-09-03
I have a combox box, cboDirecotires, that needs to be populated at the On Open event of the form with the directory path and then the letters of the alphabet.  So, if my root directory is "K\MyDirectory\" I need the series of directories in the combox to be: K\MyDirectory\A\

for the alphabet.  I also need to add on directory of K\MyDirectory\0-9, but I figured that would be after the loop.  Any suggestions?

Question by:ssmith94015
  • 2

Accepted Solution

ssmith94015 earned 0 total points
ID: 39461301
Solved it

Private Sub PopulateDestinations()
'Populates the combox destination box with the destination folder names

Dim strDestination As String
Dim intASCII As Integer
Dim i As Integer

With Me.CboDestDir
    .RowSourceType = "Value List"
For i = 65 To 90
    intASCII = i
        strDestination = "K:\DatabaseDevelopment\ACH\DEV\Repository\" & (Chr(intASCII))
        .AddItem item:=strDestination
Next i
End With

End Sub

Author Closing Comment

ID: 39461304
Solved myself.

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

I have had my own IT business for a very long time. I started mostly with hardware and after about a year started to notice a common theme. I had shelves with software boxes -- Peachtree, Quicken, Sage, Ouickbooks -- and yet most of my clients were…
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question