PC Review


Reply
Thread Tools Rate Thread

Creating & using Hyperlinks

 
 
Paul
Guest
Posts: n/a
 
      4th Oct 2008
I have created a database using Access 2003: The DB has multipul table, one
of which contains all personal information regarding a single investigation,,
Name, Addreess etc. I have included one field to contain a hyperlink address:
the address will always start the same: e.g K:\Investigations\Live\Photos\ENF
????.
The question marks are an incrimental number. I am using Autonumber to
generate the case file number - this is then used when creating a Folder in
my K: directory (as above).
When creating a new case, i require the Photo field to auto populate with
the creating the correct unique hyperlink address relating to the correct
file.
I will therefore put a comand button on screen to retrieve or link to the
file and therefore allow viewing of photos etc
Can you help :


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm....modulesdaovba
 
Reply With Quote
 
 
 
 
Dale Fye
Guest
Posts: n/a
 
      5th Oct 2008
Check out the Application.FollowHyperlink method in help. You can use this
in the click event of your command button, append the default file path, and
get the file name from the ID field of your table.

HTH
Dale

"Paul" <(E-Mail Removed)> wrote in message
news:4465016F-F03D-4E23-BDB9-(E-Mail Removed)...
>I have created a database using Access 2003: The DB has multipul table, one
> of which contains all personal information regarding a single
> investigation,,
> Name, Addreess etc. I have included one field to contain a hyperlink
> address:
> the address will always start the same: e.g
> K:\Investigations\Live\Photos\ENF
> ????.
> The question marks are an incrimental number. I am using Autonumber to
> generate the case file number - this is then used when creating a Folder
> in
> my K: directory (as above).
> When creating a new case, i require the Photo field to auto populate with
> the creating the correct unique hyperlink address relating to the correct
> file.
> I will therefore put a comand button on screen to retrieve or link to the
> file and therefore allow viewing of photos etc
> Can you help :
>
>
> ----------------
> This post is a suggestion for Microsoft, and Microsoft responds to the
> suggestions with the most votes. To vote for this suggestion, click the "I
> Agree" button in the message pane. If you do not see the button, follow
> this
> link to open the suggestion in the Microsoft Web-based Newsreader and then
> click "I Agree" in the message pane.
>
> http://www.microsoft.com/office/comm....modulesdaovba



 
Reply With Quote
 
Database Whiz Consulting
Guest
Posts: n/a
 
      5th Oct 2008
Hey Paul. Is there just the single photo file in the directory you create or
many? I would assume many.

We do something similar to what you're doing with a client of ours that
wants a paperless office. Rather than storing all of the photo information in
the database, we already know that the files for any particular investigation
are going to be in K:\Investigations\Live\Photos\ENF\XXXX where XXXX =
InvestigationID.

In this case, we simply use a list box to show the file contents of the
folder for the current investigation. All the user has to do is double-click
the file in the listbox they wish to see...or click on the file and then
click an Open File button.

In the sub below, openfile.bat simply has %1 in it, which will be the file
name you send it. Windows will use the default program to open the file,
whatever file type it is.

Private Sub cmdOpenFile_Click()
Dim ret As Integer
Dim strFile As String

On Error Resume Next

If IsNull(Me.FileList) Then
MsgBox "You did not select a file to open.", vbInformation, "No File
Selected"
Exit Sub
End If

strFile = "K:\Investigations\Live\Photos\ENF\" & Me.InvestigationID &
"\" & Me.FileList

'MsgBox Application.CodeProject.Path & "\openfile.bat " & strFile
ret = Shell("""" & Application.CodeProject.Path & "\openfile.bat"" """ &
strFile & """", vbHide)
Exit Sub

ErrorTrap:
MsgBox "Error #" & Err.Number & ": " & Err.Description, vbInformation,
"Error"

End Sub


Let me know if this helps you at all or if u need help populating the
listbox with the folder's file contents.


Ray Jefferson
Database Whiz Consulting
www.databasewhiz.com



"Paul" wrote:

> I have created a database using Access 2003: The DB has multipul table, one
> of which contains all personal information regarding a single investigation,,
> Name, Addreess etc. I have included one field to contain a hyperlink address:
> the address will always start the same: e.g K:\Investigations\Live\Photos\ENF
> ????.
> The question marks are an incrimental number. I am using Autonumber to
> generate the case file number - this is then used when creating a Folder in
> my K: directory (as above).
> When creating a new case, i require the Photo field to auto populate with
> the creating the correct unique hyperlink address relating to the correct
> file.
> I will therefore put a comand button on screen to retrieve or link to the
> file and therefore allow viewing of photos etc
> Can you help :
>
>
> ----------------
> This post is a suggestion for Microsoft, and Microsoft responds to the
> suggestions with the most votes. To vote for this suggestion, click the "I
> Agree" button in the message pane. If you do not see the button, follow this
> link to open the suggestion in the Microsoft Web-based Newsreader and then
> click "I Agree" in the message pane.
>
> http://www.microsoft.com/office/comm....modulesdaovba

 
Reply With Quote
 
Paul
Guest
Posts: n/a
 
      5th Oct 2008
Hi Ray

I thank you for your response and suggestion:
Following posting my request fro help, I was working on another part of the
program and it suddenly came to me:

See below:

If Trim(Me.[CustomerID] & "") <> "" Then
FollowHyperlink "K:\Enforcement\Investigated_Cases\ENF " & Me.[CustomerID]
Else

Very short and direct: It works perfectly:
I have one other query though and that is:

Using a main menu screen with a pop up Customer information screen (full
size), i then use various on screen buttons to pop up sized information
screens: the problem i am having is that if i click on the background screen,
the popup disappears but is running underneath the main screen.
I therefore require to lock to the opup up until it is closed..... Cant work
this one out:
the only thing that i can think of is to create a multi macro which closes
all popup screens and re-initialises the main form:
This again is working perfectly however I think there maybe a cleaner way of
doing this.... Any Ideas.

Thanks

Paul


"Database Whiz Consulting" wrote:

> Hey Paul. Is there just the single photo file in the directory you create or
> many? I would assume many.
>
> We do something similar to what you're doing with a client of ours that
> wants a paperless office. Rather than storing all of the photo information in
> the database, we already know that the files for any particular investigation
> are going to be in K:\Investigations\Live\Photos\ENF\XXXX where XXXX =
> InvestigationID.
>
> In this case, we simply use a list box to show the file contents of the
> folder for the current investigation. All the user has to do is double-click
> the file in the listbox they wish to see...or click on the file and then
> click an Open File button.
>
> In the sub below, openfile.bat simply has %1 in it, which will be the file
> name you send it. Windows will use the default program to open the file,
> whatever file type it is.
>
> Private Sub cmdOpenFile_Click()
> Dim ret As Integer
> Dim strFile As String
>
> On Error Resume Next
>
> If IsNull(Me.FileList) Then
> MsgBox "You did not select a file to open.", vbInformation, "No File
> Selected"
> Exit Sub
> End If
>
> strFile = "K:\Investigations\Live\Photos\ENF\" & Me.InvestigationID &
> "\" & Me.FileList
>
> 'MsgBox Application.CodeProject.Path & "\openfile.bat " & strFile
> ret = Shell("""" & Application.CodeProject.Path & "\openfile.bat"" """ &
> strFile & """", vbHide)
> Exit Sub
>
> ErrorTrap:
> MsgBox "Error #" & Err.Number & ": " & Err.Description, vbInformation,
> "Error"
>
> End Sub
>
>
> Let me know if this helps you at all or if u need help populating the
> listbox with the folder's file contents.
>
>
> Ray Jefferson
> Database Whiz Consulting
> www.databasewhiz.com
>
>
>
> "Paul" wrote:
>
> > I have created a database using Access 2003: The DB has multipul table, one
> > of which contains all personal information regarding a single investigation,,
> > Name, Addreess etc. I have included one field to contain a hyperlink address:
> > the address will always start the same: e.g K:\Investigations\Live\Photos\ENF
> > ????.
> > The question marks are an incrimental number. I am using Autonumber to
> > generate the case file number - this is then used when creating a Folder in
> > my K: directory (as above).
> > When creating a new case, i require the Photo field to auto populate with
> > the creating the correct unique hyperlink address relating to the correct
> > file.
> > I will therefore put a comand button on screen to retrieve or link to the
> > file and therefore allow viewing of photos etc
> > Can you help :
> >
> >
> > ----------------
> > This post is a suggestion for Microsoft, and Microsoft responds to the
> > suggestions with the most votes. To vote for this suggestion, click the "I
> > Agree" button in the message pane. If you do not see the button, follow this
> > link to open the suggestion in the Microsoft Web-based Newsreader and then
> > click "I Agree" in the message pane.
> >
> > http://www.microsoft.com/office/comm....modulesdaovba

 
Reply With Quote
 
Database Whiz Consulting
Guest
Posts: n/a
 
      5th Oct 2008
Are all of the pop up screens directly related to the Customer information on
the main screen that is open? If so, I would simply use a tab control rather
than using the pop up screens. Not in any of our applications would we have
multiple pop-up windows on screen at the same time, so I may not be
envisioning what you're doing exactly. Let me know if tab control is the way
to go though.

RJ


"Paul" wrote:

> Hi Ray
>
> I thank you for your response and suggestion:
> Following posting my request fro help, I was working on another part of the
> program and it suddenly came to me:
>
> See below:
>
> If Trim(Me.[CustomerID] & "") <> "" Then
> FollowHyperlink "K:\Enforcement\Investigated_Cases\ENF " & Me.[CustomerID]
> Else
>
> Very short and direct: It works perfectly:
> I have one other query though and that is:
>
> Using a main menu screen with a pop up Customer information screen (full
> size), i then use various on screen buttons to pop up sized information
> screens: the problem i am having is that if i click on the background screen,
> the popup disappears but is running underneath the main screen.
> I therefore require to lock to the opup up until it is closed..... Cant work
> this one out:
> the only thing that i can think of is to create a multi macro which closes
> all popup screens and re-initialises the main form:
> This again is working perfectly however I think there maybe a cleaner way of
> doing this.... Any Ideas.
>
> Thanks
>
> Paul
>
>
> "Database Whiz Consulting" wrote:
>
> > Hey Paul. Is there just the single photo file in the directory you create or
> > many? I would assume many.
> >
> > We do something similar to what you're doing with a client of ours that
> > wants a paperless office. Rather than storing all of the photo information in
> > the database, we already know that the files for any particular investigation
> > are going to be in K:\Investigations\Live\Photos\ENF\XXXX where XXXX =
> > InvestigationID.
> >
> > In this case, we simply use a list box to show the file contents of the
> > folder for the current investigation. All the user has to do is double-click
> > the file in the listbox they wish to see...or click on the file and then
> > click an Open File button.
> >
> > In the sub below, openfile.bat simply has %1 in it, which will be the file
> > name you send it. Windows will use the default program to open the file,
> > whatever file type it is.
> >
> > Private Sub cmdOpenFile_Click()
> > Dim ret As Integer
> > Dim strFile As String
> >
> > On Error Resume Next
> >
> > If IsNull(Me.FileList) Then
> > MsgBox "You did not select a file to open.", vbInformation, "No File
> > Selected"
> > Exit Sub
> > End If
> >
> > strFile = "K:\Investigations\Live\Photos\ENF\" & Me.InvestigationID &
> > "\" & Me.FileList
> >
> > 'MsgBox Application.CodeProject.Path & "\openfile.bat " & strFile
> > ret = Shell("""" & Application.CodeProject.Path & "\openfile.bat"" """ &
> > strFile & """", vbHide)
> > Exit Sub
> >
> > ErrorTrap:
> > MsgBox "Error #" & Err.Number & ": " & Err.Description, vbInformation,
> > "Error"
> >
> > End Sub
> >
> >
> > Let me know if this helps you at all or if u need help populating the
> > listbox with the folder's file contents.
> >
> >
> > Ray Jefferson
> > Database Whiz Consulting
> > www.databasewhiz.com
> >
> >
> >
> > "Paul" wrote:
> >
> > > I have created a database using Access 2003: The DB has multipul table, one
> > > of which contains all personal information regarding a single investigation,,
> > > Name, Addreess etc. I have included one field to contain a hyperlink address:
> > > the address will always start the same: e.g K:\Investigations\Live\Photos\ENF
> > > ????.
> > > The question marks are an incrimental number. I am using Autonumber to
> > > generate the case file number - this is then used when creating a Folder in
> > > my K: directory (as above).
> > > When creating a new case, i require the Photo field to auto populate with
> > > the creating the correct unique hyperlink address relating to the correct
> > > file.
> > > I will therefore put a comand button on screen to retrieve or link to the
> > > file and therefore allow viewing of photos etc
> > > Can you help :
> > >
> > >
> > > ----------------
> > > This post is a suggestion for Microsoft, and Microsoft responds to the
> > > suggestions with the most votes. To vote for this suggestion, click the "I
> > > Agree" button in the message pane. If you do not see the button, follow this
> > > link to open the suggestion in the Microsoft Web-based Newsreader and then
> > > click "I Agree" in the message pane.
> > >
> > > http://www.microsoft.com/office/comm....modulesdaovba

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: creating hyperlinks stew Microsoft Excel Misc 0 21st Dec 2008 06:08 PM
Re: creating hyperlinks Dave Peterson Microsoft Excel Misc 0 21st Dec 2008 02:37 PM
Creating hyperlinks Fred Microsoft Excel Misc 0 21st Feb 2007 03:13 PM
Creating Hyperlinks =?Utf-8?B?S2lt?= Microsoft Frontpage 3 5th Sep 2006 01:25 PM
Creating a PDF from a PPT with Hyperlinks =?Utf-8?B?UGV0ZQ==?= Microsoft Powerpoint 2 12th Sep 2005 08:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:50 AM.