Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Access2000 dialog box

Status
Not open for further replies.

44nato44

Programmer
Dec 12, 2008
115
NL
Hi

I have made a DB in MS Access 2003 and now I need to make it in ms access 2000

I have made a listbox where the file from a library will be showen. But in MS Access 2000 it is not working

I have updated all my references.

List9 is my listbox

If someone can help with either the file dialog box which then will replace my listbox or just the listbox issue then I will be a happy guy.

Thanks a lot.

Code:

Dim dir, folder, files
dir = CurrentProject.Path & "\Import"
Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder(dir)
Set files = folder.files

MyListBox.RowSourceType = "Value List"
List9.RowSourceType = "Value List"

For Each file In files
If Right(file, 3) = "xls" Or Right(file, 4) = "xlsx" Then
List9.AddItem (file.Name) & Me.List9.ListCount
End If
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top