Dim a, intIndex As Integer
For intIndex = 1 To CInt(Right(Left(DMax("[影片编号]", "[影片表]", "[影片编号] Like 'BBVDS-D5" & "*'"), 13), 4))
If IsNull(DLookup("[影片编号]", "[影片表]", "CInt(Right(Left(影片表.影片编号, 13), 4)) = intIndex" _
And "[影片表].[影片编号] Like 'BBVDS-D5" & "*'")) Then
a = intIndex
Exit For
End If
Next intIndex
Me.影片编号.Value = "BBVDS-D5" & Format(a, "0000")