Open a map

W

wilfried

I want to open a map in a mdb with vba which is linked to a result of a
field in the active form

Field on the active form shows 3 the map to find is P_3

The path is C:\wilfried\Stamps\P_3

And mery Christmas for everyone
 
B

Brian

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
map?
 
W

wilfried

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:
 
B

Brian

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?
 
B

Brian

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top