Use date qualifiers (#) instead of text qualifiers ('). Also, make sure your inputs are valid dates. Finally, you should get in the habit of capitalizing SQL key words to make it easier to read and always end your statements with ";".
Code:
If IsDate(TxtDtFrom) And IsDate(TxtDtTo) Then
MDateQry = "BETWEEN #" & TxtDtFrom & "# And #" & TxtDtTo & "#"
RsGlt.Open "SELECT Code,Tdate FROM glt WHERE (Code = " & RsDrt.Fields("Code") & ") " & _
"AND (tDate " & MDateQry & ");"
Else
Debug.Print "Invalid input"
End If