SQL = "SELECT CInt(IIf(IsNull([IDPisma])=False," & _
& "(Right([IDPisma],Len([IDPisma])-Len([Abrtheme])-6)),0)) AS maxNPT," & _
& "IIf(IsNull([IDPisma])=False,(Left([IDPisma],Len([Abrtheme])+6)),0) AS PartNPT " & _
& "FROM tblTheme INNER JOIN tblIn ON tblTheme.IDtheme = tblIn.IDtheme "& _
& "WHERE (((tblIn.IDtheme) = " & [Forms]![FormInEdit]![IDtheme] & "))"& _
& "ORDER BY CInt(IIf(IsNull([IDPisma])=False,(Right([IDPisma],Len([IDPisma])-Len([Abrtheme])-6)),0)) DESC;"
|