The following VB code works great in an on-load event:
IIf (CDate(DFirst("dssdate", "programs")) & " " & CDate(DFirst("dsstime", "programs"))) > (CDate(DFirst("dssdate", "CRMH Current Patients")) & " " & CDate(DFirst("dsstime", "CRMH Current Patients"))),[CRMH CURRENT PATIENTS]![ward id],[PATIENTS]![ward id] Then
I want use the same logic in an update query in the "Update To" line, but Access keeps telling me that the syntax is wrong. This is how it is typed in the query:
IIf (CDate(DFirst("dssdate", "programs")) & " " & CDate(DFirst("dsstime", "programs"))) > (CDate(DFirst("dssdate", "CRMH Current Patients")) & " " & CDate(DFirst("dsstime", "CRMH Current Patients"))),[CRMH CURRENT PATIENTS]![ward id],[PATIENTS]![ward id]
Any suggestions?
Thanks Again !!
IIf (CDate(DFirst("dssdate", "programs")) & " " & CDate(DFirst("dsstime", "programs"))) > (CDate(DFirst("dssdate", "CRMH Current Patients")) & " " & CDate(DFirst("dsstime", "CRMH Current Patients"))),[CRMH CURRENT PATIENTS]![ward id],[PATIENTS]![ward id] Then
I want use the same logic in an update query in the "Update To" line, but Access keeps telling me that the syntax is wrong. This is how it is typed in the query:
IIf (CDate(DFirst("dssdate", "programs")) & " " & CDate(DFirst("dsstime", "programs"))) > (CDate(DFirst("dssdate", "CRMH Current Patients")) & " " & CDate(DFirst("dsstime", "CRMH Current Patients"))),[CRMH CURRENT PATIENTS]![ward id],[PATIENTS]![ward id]
Any suggestions?
Thanks Again !!