Hyperlink field does not work with Office 365 URL for Stream video (1 Viewer)

sohcir

New member
Local time
Today, 07:00
Joined
Jan 7, 2022
Messages
5
Hi, I have an Access database that we use to manage pupil assessments and associated video evidence (among other things). The way that it works is that teachers comment on a pupils progress in relation to a target and then add a hyperlink using a hyperlink field to the video file stored on a server on our local network. The video shows how the student completed the task, how much help, how fluent etc.
This generally works fine, however, we are in the process of moving from local network storage to a cloud based solution and considering using office 365 and the Stream app in order to store and share video evidence.
I would have thought the hyperlink field would have worked in the same way - paste in the Stream URL and the user clicks the hyperlink and a browser pops up with the video, however, when I do this I get the message "Unable to open 'URL address' Cannot download the information you requested". This happens when I click on the hyperlink in a form. A hyperlink to the launch page of Office 365 stream works fine from the same form. If I export a report to pdf and click the hyperlink there are no problems opening the hyperlink.
Anyone got any thoughts on why I might be encountering this problem. I'm a self taught entry level database designer and I'm expecting lots of people to chastise me for using a hyperlink field for reasons I'm not yet aware of.
If anyone has any alternative suggestions for how I might be able to link scores and progress comments to video files they would be very welcome.
Many thanks in advance.
 

CarlettoFed

Member
Local time
Today, 08:00
Joined
Jun 10, 2020
Messages
120
To give a precise answer you would need to see the structure of the database. However, generally all you need to do is insert a button and use its click event to write the following code:
Code:
Private sub cmdOpenFile_Click()
   On Error GoTo Error_cmdOpenFile
   Application.FollowHyperlink "full address of the video file", , True
   Exit_cmdOpenFile:     
Exit Sub

Error_cmdOpenFile:     
   MsgBox Err & ": " & Err.Description     
   Resume Exit_cmdOpenFile
End Sub
 

sohcir

New member
Local time
Today, 07:00
Joined
Jan 7, 2022
Messages
5
Many thanks for your help. Very much appreciated.

I tried to apply your solution in a test database with just the 1 table and 5 fields, ID (auto number), pupil name (short text), Target (short text) and targetLink (short text) and targetlink2 (shorttext).
Apologies, strayed slightly from initial premise as I thought that, rather than using hyperlink fields I would just paste the url into a short text field and have the code in the button get it's address from the text field. This part seemed to work.
I now have a form with the 4 short text fields and 2 buttons with the following code on the buttons.

Code:
Private Sub CmdHyper1_Click()
 On Error GoTo Error_cmdOpenFile
   If Not IsNull(Me.TargetLink) Then
   Application.FollowHyperlink Me.TargetLink
Else
MsgBox "No URL found in the targetLink Field.", vbExclamation, "No URL"
End If
Exit_cmdOpenFile:
Exit Sub

Error_cmdOpenFile:
   MsgBox Err & ": " & Err.Description
   Resume Exit_cmdOpenFile
End Sub

Private Sub CmdHyper2_Click()
 On Error GoTo Error_cmdOpenFile
   If Not IsNull(Me.TargetLink2) Then
   Application.FollowHyperlink Me.TargetLink2
Else
MsgBox "No URL found in the targetLink2 Field.", vbExclamation, "No URL"
End If
Exit_cmdOpenFile:
Exit Sub

Error_cmdOpenFile:
   MsgBox Err & ": " & Err.Description
   Resume Exit_cmdOpenFile
End Sub

Link 1 tries to open URL from TargetLink (URL is direct link to video saved in MS 365 stream) and returns error message
View attachment 113121
Link 2 opens URL from targetlink2 field (URL goes to ms 365 launch page) works fine.

Hope this makes sense.
 

sohcir

New member
Local time
Today, 07:00
Joined
Jan 7, 2022
Messages
5
Many thanks for your help. Very much appreciated.

I tried to apply your solution in a test database with just the 1 table and 5 fields, ID (auto number), pupil name (short text), Target (short text) and targetLink (short text) and targetlink2 (shorttext).
Apologies, strayed slightly from initial premise as I thought that, rather than using hyperlink fields I would just paste the url into a short text field and have the code in the button get it's address from the text field. This part seemed to work.
I now have a form with the 4 short text fields and 2 buttons with the following code on the buttons.

Code:
Private Sub CmdHyper1_Click()
On Error GoTo Error_cmdOpenFile
   If Not IsNull(Me.TargetLink) Then
   Application.FollowHyperlink Me.TargetLink
Else
MsgBox "No URL found in the targetLink Field.", vbExclamation, "No URL"
End If
Exit_cmdOpenFile:
Exit Sub

Error_cmdOpenFile:
   MsgBox Err & ": " & Err.Description
   Resume Exit_cmdOpenFile
End Sub

Private Sub CmdHyper2_Click()
On Error GoTo Error_cmdOpenFile
   If Not IsNull(Me.TargetLink2) Then
   Application.FollowHyperlink Me.TargetLink2
Else
MsgBox "No URL found in the targetLink2 Field.", vbExclamation, "No URL"
End If
Exit_cmdOpenFile:
Exit Sub

Error_cmdOpenFile:
   MsgBox Err & ": " & Err.Description
   Resume Exit_cmdOpenFile
End Sub

Link 1 tries to open URL from TargetLink (URL is direct link to video saved in MS 365 stream) and returns error message
View attachment 113121
Link 2 opens URL from targetlink2 field (URL goes to ms 365 launch page) works fine.

Hope this makes sense.
Just tried to check the attached image in last post - seems not to be working - it's just the message box telling me "8: Cannot download the information you requested"
 

Users who are viewing this thread

Top Bottom