OK Chris, Thanks again and sorry to take so long to get back.
It works. .. and it is good....
For those of you with normal IQ I'll summarize the steps that I did to get to a working example.
Create a blank form
Add a command button
Then do <alt> Tools -> Component Gallery -> Foundation Classes -> Dialogs -> Common Dialog (right click) -> Add control to form (or you can copy and paste)
On the form Right click on the control which is called _COMDLG Right click properties --> select rename and call it CusCommonDialog
Then copy Chris' code ----
In the INIT method of the Command button
CREATE CURSOR AUTO_CREATE (FileName C(50))
In the Click Method
WITH THISFORM.cusCommonDialog
.lAllowMultiSelect = .T.
.cFileName = []
.cInitialDirectory = "c:\" && Or whatever you wish
.cTitlebarText = [Select source files]
.aFilterList[1,1] = [Source (bmp,doc,gif,jpg)]
.aFilterList[1,2] = [*.bmp;*.doc;*.gif;*.jpg;*.jpeg]
.nFileCount = 0
.ShowDialog()
ENDW
*The second block of code is retrieving the path\filenames
*of the selected files into a table/cursor, and
*should follow the first block.
*It should be :-
WITH THISFORM.cusCommonDialog
IF .nFileCount > 0
FOR i = 1 TO ALEN(.aFileNames,1)
INSERT INTO AUTO_CREATE (FileName) VALUES (UPPER(SYS(5)) ;
+ LOWER(ADDBS(SYS(2003)))+ LOWER(.aFileNames[1,i]))
*
ENDF
ELSE
MESSAGEBOX([No file(s) selected])
ENDI
ENDW
****** I then out on a Command Buttton with Browse on it
with a click event
Browse
Run Form...
It works like a charm,,,
Thanks everyone for your help on this one.
John Fox