Hello
I have form and couple of subform for playing audio and video file respectively
on form I selected existing data which also has respective audio and video url file, but when I select main Id from subform and if I enabled video code the access crashes.
Below is the code for audio and video file respectively.
audio file
	
	
	
		
video file
	
	
	
		
I am calling this function on after update event of main form's combobox using macro, run code and giving above function names.
If I do only for audio it does work but if I add video code it crashes the access.
 I have form and couple of subform for playing audio and video file respectively
on form I selected existing data which also has respective audio and video url file, but when I select main Id from subform and if I enabled video code the access crashes.
Below is the code for audio and video file respectively.
audio file
		Code:
	
	
	// module level declaration
Public player As VLCPlugin2
//
Public Function PlayVideo()
Set player = Forms("frm_Obs").[frm_Videos].Form.[ActiveXCtl11].Object
' player.AutoLoop = False
'   player.Playlist.Stop
'   player.Playlist.Clear
'  If player.Playlist.isPlaying Then
'    player.Playlist.playItem ("File:///" & cboVideoSelect.Column(1))
'
'    ' player.Playlist.currentItem = "File:///" & cboVideoSelect.Column(1)
' End If
   
   
    Dim strURL As String
   'MsgBox Forms("frm_obs").[frm_Audio].Form.[AudioUrl].Value
  ' MsgBox cboVideoSelect.Column(1)
  strURL = "File:///" & Forms("frm_Obs").[frm_Videos].Form.[VideoUrl].Value ' <-- this should start with File:///"
    player.Playlist.Add strURL
    Call PlayAudio
End Functionvideo file
		Code:
	
	
	Public Function PlayVideo()
Set player = Forms("frm_Obs").[frm_Videos].Form.[ActiveXCtl11].Object
' player.AutoLoop = False
'   player.Playlist.Stop
'   player.Playlist.Clear
'  If player.Playlist.isPlaying Then
'    player.Playlist.playItem ("File:///" & cboVideoSelect.Column(1))
'
'    ' player.Playlist.currentItem = "File:///" & cboVideoSelect.Column(1)
' End If
   
   
    Dim strURL As String
   'MsgBox Forms("frm_obs").[frm_Audio].Form.[AudioUrl].Value
  ' MsgBox cboVideoSelect.Column(1)
  strURL = "File:///" & Forms("frm_Obs").[frm_Videos].Form.[VideoUrl].Value ' <-- this should start with File:///"
    player.Playlist.Add strURL
    Call PlayAudio
End FunctionI am calling this function on after update event of main form's combobox using macro, run code and giving above function names.
If I do only for audio it does work but if I add video code it crashes the access.
			
				Last edited: 
			
		
	
								
								
									
	
		
			
		
		
	
	
	
		
			
		
		
	
								
							
							 
	 
 
		 Once I took out the duplicates and commented-out lines (and C++ //comments?), there's about five lines of code;  Maybe you mis-pasted?
  Once I took out the duplicates and commented-out lines (and C++ //comments?), there's about five lines of code;  Maybe you mis-pasted?
 
 
		 
 
		 
 
		 
 
		 
 
		