dlookup syntax perhaps?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I can't seem to understand where the following may be in error...appreciate
any help:

=Nz(DLookUp("MV","QrySPANMix","Week Tracker = 'Week - 1' "),0)

Week Tracker is a filed name as is MV - both within the query QrySPANMix

Thanks!
M
 
Square brackets needed around the field name if it contains a space:
=Nz(DLookUp("MV","QrySPANMix","[Week Tracker] = 'Week - 1'"),0)

More info on building the arguements for DLookup():
Getting a value from a table: DLookup()
at:
http://allenbrowne.com/casu-07.html
 
oh man - I feel silly for asking now...clearly didn't look closely enough!

thanks for the awakening Allen.

Allen Browne said:
Square brackets needed around the field name if it contains a space:
=Nz(DLookUp("MV","QrySPANMix","[Week Tracker] = 'Week - 1'"),0)

More info on building the arguements for DLookup():
Getting a value from a table: DLookup()
at:
http://allenbrowne.com/casu-07.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Monish said:
I can't seem to understand where the following may be in error...appreciate
any help:

=Nz(DLookUp("MV","QrySPANMix","Week Tracker = 'Week - 1' "),0)

Week Tracker is a filed name as is MV - both within the query QrySPANMix

Thanks!
M
 
Back
Top