OK I figured it out.
I put a button on my form with this behind it:
Private Sub getnames_Click()
Dim myfolder As String
Dim myext As String
Dim mypath As String
Dim myfile As String
myext = Me![extension]
myfolder = Me![path]
mypath = myfolder & "\" & "*." & myext
myfile = Dir(mypath, vbNormal)
Do While Len(myfile) > 0
DoCmd.GoToRecord , , acNewRec
Me![filename] = myfile
myfile = Dir
Loop
End Sub
I didn't know about the Dir command. It's pretty darn useful. Well, I hope someone can use this information.