Files of type when browsing via API call

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using a comdlg32.dll call for browsing. I got this far in setting up the
filter that gets passed to the browsing dialogue's "Files of type" dropdown:

sFilter = "JPEG and Bitmap" & Chr(0) & "*.jpg; *.bmp" & Chr(0)

In this example, the user is browsing for a picture file to import. Since I
just copied the basis of this code from an example, I can't figure out how to
expand this to a multi-line list for the dropdown box - I can only get the
single line, which allows me to stipulate multiple file extensions under a
single file type.

This may not even be truly an Access question, since it is more correctly
related to the use of the API call, but how can I expand the list to provide
multiple options in the drop-down box so that they can choose "All Files",
"All pictures", or other specific extensions I might want to allow.
 
Sorry, I don't understand what you're looking for.

Are you trying to get more than one file type available in your dialog, or
are you trying to select more than one file from the list?
 
More than one file type available (on separate lines).I know how to get
multiple types on one line, but not how to get multiple lines of one or more
types each.
 
sFilter = "JPEG" & Chr(0) & "*.jpg" & Chr(0) & _
"Bitmap" & Chr(0) & "*.bmp" & Chr(0) & _
"All" & Chr(0) & "*.*" & Chr(0)
 
Thank you. Works fine.

Douglas J. Steele said:
sFilter = "JPEG" & Chr(0) & "*.jpg" & Chr(0) & _
"Bitmap" & Chr(0) & "*.bmp" & Chr(0) & _
"All" & Chr(0) & "*.*" & Chr(0)
 
Back
Top