Sorry but the code you have makes no sense, (like the FName.Recordset). I suggest you study some more the use of DAO recordsets and refine your code. To get what you need (the exact date or the closest to it) you would simply use:
=DMax("[YourDateField]","[tblYourTable]","[YourDateField] <=#" &...