I am using the Issues DB from Microsoft
I want to give my users the ability to add links to files stored on our network. Each record of an issue in the DB should allow different files to be linked to it.
This is how I imagined it would work:
1. User creates a new issue in the DB (via the form)
2. User clicks "Add File" link which opens up a dialog box that lets them find and select the file (much like the windows browse file box)
3. Once they click "OK/Open", the list of linked files is updated to reflect the changes
-Also, the user would be able to click on any file in the list and it would open it in its default program
-As a bonus the file list would only show the name of the file instead of the entire network path.
In lieu of this I created a table for the files (tblFileLink) with the following fields:
FileID - autonumber primary key
FileName - text where descriptive name could be stored
FilePath - hyperlink where path to file could be stored
IssuesID - Lookup foreign key of Issues table to relate the tables to each other
On the form I tried the following:
-To save space I used an unbound combo box to store the list of files (ctrlFile)
-I have a clickable link called "Add File" that has this code in the OnClick Property
When I try to click "Add File" I get the error "The command or action 'InsertHyperlink' isn't available now."
-I now understand that you cannot inserthyperlink in form view
Since it can't work this way, is there another way to do it?
I want to give my users the ability to add links to files stored on our network. Each record of an issue in the DB should allow different files to be linked to it.
This is how I imagined it would work:
1. User creates a new issue in the DB (via the form)
2. User clicks "Add File" link which opens up a dialog box that lets them find and select the file (much like the windows browse file box)
3. Once they click "OK/Open", the list of linked files is updated to reflect the changes
-Also, the user would be able to click on any file in the list and it would open it in its default program
-As a bonus the file list would only show the name of the file instead of the entire network path.
In lieu of this I created a table for the files (tblFileLink) with the following fields:
FileID - autonumber primary key
FileName - text where descriptive name could be stored
FilePath - hyperlink where path to file could be stored
IssuesID - Lookup foreign key of Issues table to relate the tables to each other
On the form I tried the following:
-To save space I used an unbound combo box to store the list of files (ctrlFile)
-I have a clickable link called "Add File" that has this code in the OnClick Property
Code:
Me.ctrlFile.SetFocus
DoCmd.RunCommand acCmdInsertHyperlink
When I try to click "Add File" I get the error "The command or action 'InsertHyperlink' isn't available now."
-I now understand that you cannot inserthyperlink in form view
Since it can't work this way, is there another way to do it?