[AccessD] open a video file...

Kostas Konstantinidis kost36 at otenet.gr
Fri Feb 14 11:44:10 CST 2014


hi,
In a form I use the follown code:

Private Sub FilmID_DblClick(Cancel As Integer)
Dim fname, x As String
fname = "F:\Trailers\" & Me.FilmID & "*"  <— I don’t know if its the correct syntax
x = IIf(InStrRev([fname], ".") > 0, Mid([fname], InStrRev([fname], ".") + 1), "")
if fname = “” then ‘appears a message for file not found
else
Shell "C:\Program Files (x86)\Windows Media Player\wmplayer.exe F:\Trailers\fname", vbNormalFocus
End Sub

Every stored file into F:\ Trailers is titled with the same FilmID as filename (e.g FilmId = 3070 filename = 3070.mp4) but the extensions may be different while some files are saved as .mp4 some as .avi and some others as .flv etc rtc...
When Shell() calls wmplayer, it opens but it can't play the file because obviously it can't find it...

Thank you for any help

/kostas


More information about the AccessD mailing list