By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,346 Members | 2,318 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,346 IT Pros & Developers. It's quick & easy.

Check value by DLookup

P: n/a
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

Aug 23 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
"Eric" <eh******@gmail.comschreef in bericht news:11**********************@h48g2000cwc.googlegr oups.com...
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
Aug 24 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.