Data Access Pages - Repost

P

PHisaw

Hi,

Please forgive the reposting of message but the first didn't receive any
feedback and I was so hoping I would be able to find help here. Please see
original message below.

I found a few messages about DAP's in this group, but none with info that
will help me. I've spent a considerable amount of time searching, but can't
seem to find answer and I'm hoping someone here can help.

I have a form in a simple database that holds a literature collection with
links to pdf files on server. Some users do not have database and I'm trying
to set up the data access page for them to use. There will be no user entry,
just searches and linking to pdf files. I have a form that I set up with the
following code for a command button for each record that links to the pdf to
view that records piece of literature.
Private Sub Command21_Click()
Dim strPath As String
strPath = "\\dell4lysk21\databases\PDF\" & Me.[ITEM NUMBER] & ".pdf"
If Dir(strPath) = "" Then
MsgBox "There is no pdf for this brochure."
Else
Application.FollowHyperlink strPath
End If

End Sub

I have my page set up so that now it will list all literature in the db. I
need to have that command button open the pdf file and cannot figure out how
to do it. I realize this is VBA code and I need VBScript or some other
language to make it work for the data access page. I can get it to open the
pdf collection folder, but how do I write the code for the where clause
"WHERE item number = .pdf" for individual files.

If anyone can help, it will be greatly appreciated.
Thanks,
Pam
 

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