I have a subform with main form. I deleted record source of subform and put below code line in forms OnLoad event. It displays all records in subform at opening / loading
RecSQL = "SELECT T_NFS.[No], T_NFS.MName, T_NFS.[Date_of_Birth], T_NFS.City, T_NFS.Mstate FROM T_NFS"
I placed a combo box onto main from based on a table that have 12 records as month. (Just numbers as 1, 2,3,......12)
I need subform to requery and present new records based upon selection of the month from the combo box. Hence I wront similiar select statement code line but with creiteria in AfterUpdate event of combo.
But code produces error on "M"
RecSQL = "SELECT T_NFS.[No], T_NFS.MName, T_NFS.[Date_of_Birth], T_NFS.City, T_NFS.Mstate FROM T_NFS WHERE (DatePart("M",[Date_of_ Birth])=combo14;"
How can I get the all the people whose birth month is that I selected in the combo box ?