Semicolon not the issue. I changed the field delimiters with a simple rename to use underscore and re-ran the sub, but Dir still not finding the file.
Code:
Private Sub cmdImport_Click()
'*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
' This sub looks first at the sermon portal where audio files are passed
' to the TMS host machine within the LAN. Secondly, the sub will interrogate
' the downloadsAdjusted to see if any audio files have been extracted from
' Youtube videos and adjusted to the TMS format that also need to be
' imported.
'*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
Dim strSerFldr As String
Dim strNewSer As String
Dim strTMSfmt() As String
Dim rsSermons As DAO.Recordset
strSerFldr = DLookup("InstSerLib", "InstProperties")
Set rsSermons = DBEngine(0)(0).OpenRecordset("QSermons")
With rsSermons
Debug.Print strSerFldr & "DownloadsAdjusted\" & "*.mp3"
strNewSer = Dir(strSerFldr & "DownloadsAdjusted\" & "*.mp3")
Do While Len(strNewSer) <> 0
strTMSfmt = Split(strNewSer, "_")
If UBound(strTMSfmt) = 5 Then
.AddNew
!SDate = strTMSfmt(0)
!SBook = strTMSfmt(1)
!SReference = strTMSfmt(2)
!SPresenter = strTMSfmt(3)
!SComments = strTMSfmt(4)
!SFileType = strTMSfmt(5)
!SDuration = GetDuration(strSerFldr, strNewSer)
!SFileName = strNewSer
.Update
Else
MsgBox "Don't recognize format of '" & strNewSer & "'"
End If
strNewSer = Dir
Loop
End With
rsSermons.Close
Set rsSermons = Nothing
End Sub
The renamed file: 2024.01.07.0_Psalm_95_Daniel Ransom__.mp3 (eliminating consecutive delimiters made no difference)