Check value by DLookup

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
 
A

Arno R

Why are you not listening ??
Please do NOT multipost !!!!

If you *have to* then crosspost.
Multi-posting really is wasting people's time.

Arno R
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top