Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link for Viewing TIF files 2

Status
Not open for further replies.

StellasGrandpa

Programmer
Mar 12, 2001
9
US
The doctor's office I'm working for receives Faxes related to their patients (e.g. X-rays, labs, etc.) which they file in a TIF format with consistently named file names, which include the patient's chart number. The file name and path is captured in an MSA97 table. What we'd like to be able to do is select a patient's chart, and then view any and all of the documents thus captured (along with such things as Word documents). Any ideas on how this could be accomplished (preferably within Access, but by any means if that is not possible)?

StellasGrandpa
 
Hi, StellasGrandpa!

Create new field in the table (Huperlink). Then create textbox on your form with data source this new field (e.g. FilePathHyp). By clicking on this hyperlink file will be opened.

Note.
For updating of new field with existing data (file paths) run query like this:
UPDATE MyTable SET MyTable.FilePathHyp = "#" & [FilePath] & "#";

# -> with this constraints are stored hyperlinks in the table
e.g. C:\MyDirectory\ReadMe.txt
[FilePath] -> full disk file's path (from your table)

Aivars

 
Thanks for that suggestion. It sounds promising. Are the "#" signs reserved symbols (I suspect they are!) We'll need to do some modifying of our file-naming convention in that case, as we used "#" signs embedded in the file name as delimiters. e.g: chartno#typeofDoc#Datestamp.fileext.

I'll give this a shot, and see how we do. Thanks again.

Gary
 
One of the things about Access I don't like is the quality of the pictures it displays. We use parts diagrams showing all parts of a component exploded and have trouble reading numbers and seeing parts clearly. I have have corrected that by using a high quality application which is registered in the registry as the viewer associated with the extensions. For instance, when I open a file using OpenFile it associates the extension with the application and uses that application to display the file. If I were to call the function with the following:

Call OpenFile("anyfilename.jpg")

it would open the file in Smart Pix Manager or whatever else was registered and display the graphic with a SIGNIFICANTLY better clarity. Another advantage of this technique is that I can also use that application to ZOOM from 25% to 6000%.

Steve King


Public Sub OpenFile(strFile As String)

Dim hWnd As Long
hWnd = GetAccessHandle
Dim lngResult As Long
On Error Resume Next

lngResult = ShellExecute(hWnd, "Open", strFile, 0&, 0&, vbMaximizedFocus)
SendKeys ("^N")

End Sub

Public Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long

Growth follows a healthy professional curiosity
 
Steve,
Thanks for that great suggestion. I'll follow up on that and see how it will work for us.

Gary
 
Hi, Gary!

You misunderstood me probably. Symbol # must be put on start and end of path string of hyperlink field value when you update this field by using update query or by using VBA codes (recordset):

#C:\MyDirectory\ReadMe.txt#
Try to write simply real disk file's path string in the hyperlink field of any table. Then click on this field

Aivars

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top