Hello,
I have a form that I am trying to set RecordSource based on a partial date selected from a table. I am using the following code to find records in the table:
Set rst = dbs.OpenRecordset("SELECT tblStrawmanQ.StrawID, tblStrawmanQ.State, “ _
& “tblStrawmanQ.Media, tblStrawmanQ.DropDate, tblStrawmanQ.InHomeDate, “ _
& “tblStrawmanQ.Campaign, tblStrawmanQ.PlanCirculation, tblStrawmanQ.Priority, " _
& "tblStrawmanQ.Notes, (DatePart('m',[tblStrawmanQ].[DropDate]) & '/' & DatePart('yyyy',[tblStrawmanQ].[DropDate])) AS DtPt " _
& "FROM tblStrawmanQ;")
I am using Access 2003, the code worked first time, but now I am getting the following error: Run-time error '13'; Type mismatch
Thank you.
I have a form that I am trying to set RecordSource based on a partial date selected from a table. I am using the following code to find records in the table:
Set rst = dbs.OpenRecordset("SELECT tblStrawmanQ.StrawID, tblStrawmanQ.State, “ _
& “tblStrawmanQ.Media, tblStrawmanQ.DropDate, tblStrawmanQ.InHomeDate, “ _
& “tblStrawmanQ.Campaign, tblStrawmanQ.PlanCirculation, tblStrawmanQ.Priority, " _
& "tblStrawmanQ.Notes, (DatePart('m',[tblStrawmanQ].[DropDate]) & '/' & DatePart('yyyy',[tblStrawmanQ].[DropDate])) AS DtPt " _
& "FROM tblStrawmanQ;")
I am using Access 2003, the code worked first time, but now I am getting the following error: Run-time error '13'; Type mismatch
Thank you.