Hi guys,
I have migrated tables from MS Access to sql server and when I tried to run the forms (which are on MS Access) then they work fine most of the times but where there is date filter in the code it fails . Please see below the code (I had to format the date to make it working otherwise it wasn't pulling through any records). Just wondering what date format does sql server accepts and is there any other workaround for this?
Many Thanks,
Derek
I have migrated tables from MS Access to sql server and when I tried to run the forms (which are on MS Access) then they work fine most of the times but where there is date filter in the code it fails . Please see below the code (I had to format the date to make it working otherwise it wasn't pulling through any records). Just wondering what date format does sql server accepts and is there any other workaround for this?
Code:
Set rs = CurrentDb.OpenRecordset("select Purpose,Direction,Outcome,Date_Feedback from qry_FormsCat_SignOff_Audits_All WHERE Date_Feedback >= #" & Format(Forms!frm_FormsCat_SignOff!txtStartDate, "M/D/YYYY") & "# AND AgentRef= '" & Forms!frm_FormsCat_SignOff!cboStaffNumberRef & "'", dbOpenDynaset, dbSeeChanges)
Many Thanks,
Derek