Start a video in WMP (Access 2013) at a defined time within the video


I am working in access and am trying to determine if there is a way to have the windows media player control start a video at a specific point as well as stop at a specific point either determined via code of within a field on the form.  

I have the player working running the video but am hoping to have it run from a time to a time and stop.

is this possible?
James StevensAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jeffrey CoachmanMIS LiasonCommented:
What code are you using now?

If the time ranges are predefined, for example:

...Then it may be easier to just use a video editing program to make separate files for each chapter...
James StevensAuthor Commented:
I am using VBA in Access.  Right now I have a button to watch the video which opens a form.  The on open event plays a video clip as defined the field text44.  At this time I am splitting the files in a video editor but as this takes a great deal of time I thought maybe there was a way to simply record the time ranges for each record and not have to edit a file 15-20 times.

Following is my current code:
Private Sub Form_Open(Cancel As Integer)

Set player = Me.WindowsMediaPlayer6.Object
player.settings.autoStart = True
player.URL = Me.Text4

    With Me
        .WindowsMediaPlayer6.Height = .InsideHeight
        .WindowsMediaPlayer6.Width = .InsideWidth
    End With
End Sub
Jeffrey CoachmanMIS LiasonCommented:
Sorry, ...I thought you only needed a few "Chapters"
 Acronis Global Cyber Summit 2019 in Miami

The Acronis Global Cyber Summit 2019 will be held at the Fontainebleau Miami Beach Resort on October 13–16, 2019, and it promises to be the must-attend event for IT infrastructure managers, CIOs, service providers, value-added resellers, ISVs, and developers.

Jeffrey CoachmanMIS LiasonCommented:
Here is a link to all the windows video play properties...
It seems that the file you are opening must support the needed properties:
SelectionEnd       Read/Write       Sets or retrieves a value specifying the time when playback of the current clip will stop.
SelectionStart       Read/Write       Sets or retrieves a value specifying where playback of the current clip will begin.
MarkerCount       Read-only       Retrieves a value specifying the number of markers in the current clip.
CurrentMarker       Read/Write       Sets or retrieves a value indicating the current marker number.
CanSeekToMarkers       Read-only       Retrieves a value specifying whether markers in the file can be located with a seek operation.
CanSeek       Read-only       Retrieves a value specifying whether the current file has the ability to seek to a specific time.
James StevensAuthor Commented:
Thank you for the assistance!  The information above got me onto the right track.  

The code that ended up working was:
.Controls.currentPosition = # of seconds into the video

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jeffrey CoachmanMIS LiasonCommented:

Can you post the code for let's say, ...2 "Chapters"

This would be a great help for other members searching here for the same issue...

BTW, ...I believe you can actually accept your own post as the solution here...
Congratulations on getting this going!

No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

-- James Stevens (https:#a42043371)
-- Jeffrey Coachman (https:#a42042710)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

Experts-Exchange Cleanup Volunteer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.