E
Eric
This is the query which i run when the form load. In
tbl_EquipmentChronology there are three variables Equipment1,
Equipment2, Equipment3. If Equipment1 and 2 are not empty then the
query copy equipment2 value in txt of table tbl_Event. Is it possible i
do the same IIF or any other way i check into DLookup. I mean same if
in tbl_EquipmentChronology Equipment1, 2 and 3 are not empty it shows
the value from Equipment3 in List17.
Thanks
Me.List17=DLookUp("[Equipment1]","tbl_EquipmentChronology",
"[TicketNum] ='" & tbl_Events.TicketNum & "' And [Outlet]='" &
tbl_Events.PPVVOD_Outlet & "'")
This is the query which i run:
UPDATE
tbl_Events
SET
tbl_Events.txt =
iif(nz([tbl_EquipmentChronology].[Equipment3]
,"")<>"",[tbl_EquipmentChronology].[Equipment3],
iif(nz([tbl_EquipmentChronology].[Equipment2]
,"")<>"",[tbl_EquipmentChronology].[Equipment2],
[tbl_EquipmentChronology].[Equipment1]))
From
tbl_Events
INNER JOIN tbl_EquipmentChronology
ON tbl_Events.TicketNum =
tbl_EquipmentChronology.TicketNum
WHERE
tbl_Events.PPVVOD_Outlet=[Tbl_EquipmentChronology].[Outlet]
And tbl_Events.PPVVOD_Outlet<>0
tbl_EquipmentChronology there are three variables Equipment1,
Equipment2, Equipment3. If Equipment1 and 2 are not empty then the
query copy equipment2 value in txt of table tbl_Event. Is it possible i
do the same IIF or any other way i check into DLookup. I mean same if
in tbl_EquipmentChronology Equipment1, 2 and 3 are not empty it shows
the value from Equipment3 in List17.
Thanks
Me.List17=DLookUp("[Equipment1]","tbl_EquipmentChronology",
"[TicketNum] ='" & tbl_Events.TicketNum & "' And [Outlet]='" &
tbl_Events.PPVVOD_Outlet & "'")
This is the query which i run:
UPDATE
tbl_Events
SET
tbl_Events.txt =
iif(nz([tbl_EquipmentChronology].[Equipment3]
,"")<>"",[tbl_EquipmentChronology].[Equipment3],
iif(nz([tbl_EquipmentChronology].[Equipment2]
,"")<>"",[tbl_EquipmentChronology].[Equipment2],
[tbl_EquipmentChronology].[Equipment1]))
From
tbl_Events
INNER JOIN tbl_EquipmentChronology
ON tbl_Events.TicketNum =
tbl_EquipmentChronology.TicketNum
WHERE
tbl_Events.PPVVOD_Outlet=[Tbl_EquipmentChronology].[Outlet]
And tbl_Events.PPVVOD_Outlet<>0