From: John W. Vinson on 18 Mar 2010 12:44 On Thu, 18 Mar 2010 09:06:51 -0700, "Reggie" <No_Spam_chief123101(a)yahoo.com> wrote: >No. The open file dialog opens (strfilter = OpenFileExt(strfilter, "Excel >Files(*.XLS)", "*.XLS")). The user selects the file (ex. C:\MyFile or >whatever) and this is placed into strfilter(variable file name). >tblAMCR_Import_Temp is the table I am transfering the excel spreadsheet >into. It works if strfilter = C:\MyFile but not if C:\My File. Ok. Sorry, brainfade there! Try surrounding the filename with quotemarks: Const Q = """" strfilter = Q & OpenFileExt(strfilter, "Excel Files(*.XLS)", "*.XLS") & Q so that it sees "C:\My File" with the quotes. -- John W. Vinson [MVP]
From: Reggie on 18 Mar 2010 18:15 "John W. Vinson" <jvinson(a)STOP_SPAM.WysardOfInfo.com> wrote in message news:hvl4q5hf34aqqhkptgsc0uiaqee3ao1kfe(a)4ax.com... > On Thu, 18 Mar 2010 09:06:51 -0700, "Reggie" > <No_Spam_chief123101(a)yahoo.com> > wrote: > >>No. The open file dialog opens (strfilter = OpenFileExt(strfilter, "Excel >>Files(*.XLS)", "*.XLS")). The user selects the file (ex. C:\MyFile or >>whatever) and this is placed into strfilter(variable file name). >>tblAMCR_Import_Temp is the table I am transfering the excel spreadsheet >>into. It works if strfilter = C:\MyFile but not if C:\My File. > > Ok. Sorry, brainfade there! > > Try surrounding the filename with quotemarks: > > Const Q = """" > strfilter = Q & OpenFileExt(strfilter, "Excel Files(*.XLS)", "*.XLS") & > Q > > so that it sees "C:\My File" with the quotes. > -- > > John W. Vinson [MVP] John it didn't like: strfilter = Q & OpenFileExt(strfilter, "Excel Files(*.XLS)", "*.XLS") & Q however this worked like a champ: strfilter = OpenFileExt(cDQ & strfilter & cDQ, "Excel Files(*.XLS)", "*.XLS") Thanks! -- Reggie
First
|
Prev
|
Pages: 1 2 Prev: Auto number displays in access table instead of my descriptions. Next: Finding Last Record |