473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

PopulateCombo Box Row Source with list of files

MS
I've been trying to find a simple way to populate the rowsource of a Combo
Box with the .mdb files in a folder.

Being a little "programatically challenged", I wanted to keep it as simple
as possible.

I've come up with the following. We're talkin' A97.

Can anyone see any problems that might arise using this method? Assume that
"path" = the path to the files.

Dim path as String
Dim MyFile As String
Dim MyList As String

MyFile = Dir(path & "*.mdb")

Do Until MyFile = ""
MyList = MyList
MyFile = Dir
MyList = MyList & MyFile & ";"
Loop

Me.Cmb1.RowSource = MyList
Nov 13 '05 #1
1 1327
no, it should work fine. You might want to make it a bit more
flexible, though. You could use the BrowseFolderAPI to get the path
the easy way... (if it's not supposed to be static - if it is, it's a
moot point.)

http://www.mvps.org/access/api/api0002.htm

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: M.E.Farmer | last post by:
Hello c.l.py!, I have just finished this and decided to share. PySourceColor is a module to convert Python source into colored html. Yes it has been done before, but I like this better:) You can...
4
by: abi | last post by:
i would like to refer to the source code of container class list for a project implementation of mine. all that i find on a goog search is list of header files and discussion on the c++ issues like...
2
by: RSB | last post by:
Hi Every one, I am currently using Visual Studio .Net and trying to open a project from SourceSafe and once i open the project for the first time i get the following error/warning... "The...
4
by: Robert Schneider | last post by:
I'm using subversion. But I guess this is not important for the issue. So which files of a VB project should be (at least) under source control? Or which ones definitly not? I know from VB6...
135
by: Xah Lee | last post by:
Tabs versus Spaces in Source Code Xah Lee, 2006-05-13 In coding a computer program, there's often the choices of tabs or spaces for code indentation. There is a large amount of confusion about...
3
by: lukefrancomusic | last post by:
I am trying to learn Python. I am working on a simple backup program (code listed below). When using a source directory (the files to be backed up) without spaces in the title, my program works...
0
by: georgerxz | last post by:
Download source code in C for learning Data structure implementation from http://zsoftwares.googlepages.com/CPrograms.html and http://zsoftwares.googlepages.com/DSFPrograms.htm Source...
0
by: Sells, Fred | last post by:
the short answer is a file is a module; therefore to 'include' access to 'myclass' in file xyz.py from another file called 'abc.py' you would put this in abc.py import xyz #note no '.py' x =...
6
by: Paul Wilson | last post by:
Hi all, I'd like to be able to do the following to a python source file programmatically: * Read in a source file * Add/Remove/Edit Classes, methods, functions * Add/Remove/Edit Decorators *...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.