Advertisement

06.26.2008 at 05:47PM PDT, ID: 23520332
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

Error opening a Word Doc from Access

Asked by d10u4v in Access Coding/Macros, Access Forms

Tags: , ,

Hi,

I'm trying to open a Word Doc from a list box.  It begins to open the file and then stops with a Runtime 5174 Error, which says "This file could not be found (c:\//program%20files/contactplus/docu...)  The debug window stops on [objApp.Documents.Open strDocName] if i hover over this, the file name and location is correct.

Where if it getting the location for the file wrong?

My codes are:
OpenWordDoc Module:
Sub OpenWordDoc(strDocName As String)
Dim objApp As Object
'Opens the document

Set objApp = CreateObject("Word.Application")
objApp.Visible = True
objApp.Documents.Open strDocName
End Sub
________________________________________________
Code which starts the process:

Private Sub lbDocuments_DblClick(Cancel As Integer)
cust_identifier = Me.lbDocuments.Value
strSQL = "SELECT * FROM tbl_documents WHERE tbl_documents.id = " & cust_identifier

Dim rs As Recordset
Set rs = CurrentDb.OpenRecordset(strSQL)
If Not rs.EOF And Not rs.BOF Then

If rs!file_type = "Word" Then
MsgBox "Open as a Word Document", vbInformation
Call OpenWordDoc(rs!document_path)
Exit Sub
ElseIf rs!file_type = "PDF" Then
MsgBox "Open as a PDF", vbInformation
Exit Sub
ElseIf rs!file_type = "Excel" Then
MsgBox "Open as a Excel", vbInformation
End If
End If
End Sub
________________________________________________
I hope somone can show me where i'm going wrong.

Thanks
TomStart Free Trial
[+][-]06.26.2008 at 09:28PM PDT, ID: 21880988

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.27.2008 at 01:17AM PDT, ID: 21881699

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Coding/Macros, Access Forms
Tags: Microsoft, Access, 2007
Sign Up Now!
Solution Provided By: d10u4v
Participating Experts: 1
Solution Grade: A
 
 
[+][-]06.27.2008 at 08:33AM PDT, ID: 21884830

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.27.2008 at 11:12AM PDT, ID: 21886336

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.27.2008 at 02:05PM PDT, ID: 21887658

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080924-EE-VQP-39 / EE_QW_2_20070628