E
Eric
Some times query returns null, invalid value or syntax error based on
Forms!tbl_PPVResearch_Edit!frm_Events!TicketNum. User input wrong
ticket number, is it possible that before i execute the query i will
check if its valid then execute other wise skip
Private Sub updt()
Dim qry As String, rst As Object
qry = "UPDATE tbl_Events INNER JOIN tbl_EquipmentChronology ON
tbl_Events.TicketNum = tbl_EquipmentChronology.TicketNum SET
tbl_Events.txt =
IIf(nz([tbl_EquipmentChronology].[Equipment3],'')<>'',[tbl_EquipmentChronology].[Equipment3],IIf(nz([tbl_EquipmentChronology].[Equipment2],'')<>'',[tbl_EquipmentChronology].[Equipment2],[tbl_EquipmentChronology].[Equipment1]))
WHERE (((tbl_Events.PPVVOD_Outlet)=[Tbl_EquipmentChronology].[Outlet]
And (tbl_Events.PPVVOD_Outlet)<>0) AND (tbl_events.TicketNum)=" &
Forms!tbl_PPVResearch_Edit!frm_Events!TicketNum & ")"
CurrentDb.Execute qry
End Sub
Thanks,
Forms!tbl_PPVResearch_Edit!frm_Events!TicketNum. User input wrong
ticket number, is it possible that before i execute the query i will
check if its valid then execute other wise skip
Private Sub updt()
Dim qry As String, rst As Object
qry = "UPDATE tbl_Events INNER JOIN tbl_EquipmentChronology ON
tbl_Events.TicketNum = tbl_EquipmentChronology.TicketNum SET
tbl_Events.txt =
IIf(nz([tbl_EquipmentChronology].[Equipment3],'')<>'',[tbl_EquipmentChronology].[Equipment3],IIf(nz([tbl_EquipmentChronology].[Equipment2],'')<>'',[tbl_EquipmentChronology].[Equipment2],[tbl_EquipmentChronology].[Equipment1]))
WHERE (((tbl_Events.PPVVOD_Outlet)=[Tbl_EquipmentChronology].[Outlet]
And (tbl_Events.PPVVOD_Outlet)<>0) AND (tbl_events.TicketNum)=" &
Forms!tbl_PPVResearch_Edit!frm_Events!TicketNum & ")"
CurrentDb.Execute qry
End Sub
Thanks,