The first problem was due to the line being split over two lines by your
newsgroup reader. This is something you need to watch out for when code is
posted here.
As regards the second problem the use of angle brackets in code samples is
to indicate where some sort of expression needs to be entered at that place
in the paradigm. As Bob says, use quotes to delimit a literal string
expression. It rather looks as though your path does not include the file
name however, so that, including the .pdf extension, should be added to the
string.
Hard coding a path does make maintenance difficult, however, should the
location of the files be changed for instance. Better would be to store the
path to the folder in one field in the underlying table, and the name of the
pdf file in another. That way its simply a question of updating the data in
the table if any changes are necessary. In the code behind the button on
your form you can then assign the path to the variable with:
strPDFPath = Me.FolderPath & "\" Me.FileName
This assumes the FolderPath field does not include a final backslash
character and the FuleName field includes the .pdf extension.
Ken Sheridan
Stafford, England
:
Great...that problem is solved. Now, I am having issues entering a path. I
keep getting this error:
Compile Error:
Expected: expression
Here is what I have: strPDFPath = <S:\MANIFEST\Marketing\Graphic
Design\Project Files\Broker_Programs\PDFs>
:
in
I keep getting this error message:
Compile error:
Expected: line number or label or statement or end of statement.
It is highlighting the firs ( in the following:
(ByVal _
hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String,
ByVal _ lpParameters As String, ByVal lpDirectory As String, ByVal
nshowcm As Long)
Any suggestions?
(I apologize for my lack of knowledge, but I am a beginner.)
Thanks
(ByVal _ should be on the line above.
e.g. .Decl.. "ShellExecuteA" (ByVal _
should be 1 line.