There is a problem. In the code:
rec.Source = "SELECT top 2 * FROM pfts_index WHERE Date<=# & DateStr & # ORDER BY Date DESC"
the parameter DateStr, which recieved by InputBox function, has following format "21.06.2001". And the code does not work. If I put "21/06/2001" instead of DateStr, it works well. I think the matter is in the date separators ("." and "/"). What I have to do, please?




Reply With Quote