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

Syntax of DLookup

P: n/a
Can any one please tell me the syntax is correct

Me.List17=DLookUp(["Equipment1"],["tbl_EquipmentChronology"],["TicketNum]="[
& tbl_Events.TicketNum & ]" And [Outlet]="[ &
tbl_Events.PPVVOD_Outlet &])

Thanks,

Aug 22 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Eric wrote:
Can any one please tell me the syntax is correct

Me.List17=DLookUp(["Equipment1"],["tbl_EquipmentChronology"],["TicketNum]="[
& tbl_Events.TicketNum & ]" And [Outlet]="[ &
tbl_Events.PPVVOD_Outlet &])

Thanks,
no its not, try this

Me.List17=DLookUp("[Equipment1]", _
"tbl_EquipmentChronology", "[TicketNum] ='" _
& tbl_Events.TicketNum & "' And [Outlet]='" _
& tbl_Events.PPVVOD_Outlet & "'")

Aug 22 '06 #2

P: n/a
The square brackets are not right.

Try this kind of thing:
Me.List17 = DLookUp("Equipment1", "tbl_EquipmentChronology",
"[TicketNum] = " & [TicketNum] & " And [Outlet] = " & [PPVVOD_Outlet])

That need extra quotes if TickeNum or Outlet are Text fields.

For an explanation, see:
Getting a value from a table: DLookup()
at:
http://allenbrowne.com/casu-07.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Eric" <eh******@gmail.comwrote in message
news:11*********************@h48g2000cwc.googlegro ups.com...
Can any one please tell me the syntax is correct

Me.List17=DLookUp(["Equipment1"],["tbl_EquipmentChronology"],["TicketNum]="[
& tbl_Events.TicketNum & ]" And [Outlet]="[ &
tbl_Events.PPVVOD_Outlet &])

Aug 22 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.