neglecting apostrophe in name from combo ?

  • Thread starter Thread starter יריב החביב
  • Start date Start date
×

יריב החביב

Hello,

way is'nt it work ?

Dim lettername As String
rs.FindFirst "[lettername] = " & Chr$(34) & Me![Combo36] & Chr$(34)
Application.FollowHyperlink "c:\lettername.doc"

the name (lettername) still have apostrophe

thank's

תודה רבה
 
Are you trying to open a Word file whose name is selected from the combo box?
If so then you don't need to navigate to the row in a recordset; simply
concatenate the file name into the string expression:

Dim lettername As String

lettername = Me.Combo36
Application.FollowHyperlink "c:\" & lettername & ".doc"

Does the combo box include the path to each file, e.g.
Users\MyName\Documents\Letters\MyLetter, as otherwise the above would mean
the file is in the root folder of the local C drive, which would be unusual.

Ken Sheridan
Stafford, England
 
thank you brother
--
תודה רבה


Ken Sheridan said:
Are you trying to open a Word file whose name is selected from the combo box?
If so then you don't need to navigate to the row in a recordset; simply
concatenate the file name into the string expression:

Dim lettername As String

lettername = Me.Combo36
Application.FollowHyperlink "c:\" & lettername & ".doc"

Does the combo box include the path to each file, e.g.
Users\MyName\Documents\Letters\MyLetter, as otherwise the above would mean
the file is in the root folder of the local C drive, which would be unusual.

Ken Sheridan
Stafford, England

יריב החביב said:
Hello,

way is'nt it work ?

Dim lettername As String
rs.FindFirst "[lettername] = " & Chr$(34) & Me![Combo36] & Chr$(34)
Application.FollowHyperlink "c:\lettername.doc"

the name (lettername) still have apostrophe

thank's

תודה רבה
 

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

Similar Threads


Back
Top