I only want to cunsult the map corresponding with the field StampsId
on the active form so that I could see what files are in the map: word
documentens, JPG and BMP files
I want to do so with a command button but I don't now how to do so (I
think I have to do so with a VBA code but I don't know very much about
it).
Field stampsId on the active form shows "3" the map to find is "P_3"
Field stampsId on the active form shows "4" the map to find is "P_4"
All the maps are in the following path: C:\wilfried\stamps\ P_X (X
stands for the number of each stamp=stampsId)
Thanks for your quick repley
Brian schreef:
> Assuming the map to which you refer is some type of file on the computer,
> what is the format of the map file? That is, what program is used to open the
[quoted text clipped - 8 lines]
> >
> > And mery Christmas for everyone
Brian - 25 Dec 2006 17:00 GMT
I am just a little confused about your usage of the word "map". You are
evidently not referring to a map file. It appears to me that you want to see
the list of files in the folder C:\wilfried\Stamps\P_3. Is this correct?
> I only want to cunsult the map corresponding with the field StampsId
> on the active form so that I could see what files are in the map: word
[quoted text clipped - 26 lines]
> > >
> > > And mery Christmas for everyone
Brian - 28 Dec 2006 01:36 GMT
If you want to show the contents of the folder, use the Dir command like this:
Private Sub Command3_Click()
Dim DirPath As String
Dim FileName As String
DirPath = "C:\wilfried\stamps\ P_3\*"
FileName = Dir(DirPath) 'get first file name
Do While FileName <> ""
MsgBox FileName
FileName = Dir() 'get next file name
Loop
End Sub
This will list each file in turn. To generate a list, either append each
entry to a table, and then run a query or report to show the contents of the
table, or assign the values to an array and show the contents of the array
when done the loop.
> I only want to cunsult the map corresponding with the field StampsId
> on the active form so that I could see what files are in the map: word
[quoted text clipped - 26 lines]
> > >
> > > And mery Christmas for everyone