dlookup on Query failing

  • Thread starter Thread starter pubdude2003 via AccessMonster.com
  • Start date Start date
P

pubdude2003 via AccessMonster.com

hey all, been a long, long week!

I am trying to do a simple dlookup on a query

=Nz(DLookUp([CountOfJustFile],"Query8"))

I have tried every combination of the quotations and square brackets (with
and without the Nz) but it continues to fail. As you can see the 'field' is a
count of a field (which should be an integer?) on a query call Query8.

Any help would be appreciated.
 
like I said a long, long weekend!
=Nz(DLookUp([CountOfJustFile],"Query8"))

could have sworn I tested this combination 5 times, anyways it works now...
yeah!!

=DLookUp("countofjustfile","Query8")
 
hey all, been a long, long week!

I am trying to do a simple dlookup on a query

=Nz(DLookUp([CountOfJustFile],"Query8"))

I have tried every combination of the quotations and square brackets (with
and without the Nz) but it continues to fail. As you can see the 'field' is a
count of a field (which should be an integer?) on a query call Query8.

Any help would be appreciated.

The syntax of DLookUp has three parameters, all strings; the third one
is optional. If Query8 (which you REALLY REALLY should rename, nobody
including yourself a week from now will ever know what that query is!)
contains a field named CountOfJustFile and returns only one record,
the syntax would be

DLookUp("[CountOfJustFile]", "[Query8]")

You can probably write a DCount() expression to do the work that
Query8 is doing, and avoid having to store Query8 at all... but since
I don't know what Query8 is doing...

John W. Vinson [MVP]
 
lol, John, you are so right... I am terrible for expirmenting with code and
then leaving the 'experiment' in the final application. But it's only been a
year since I cured myself from naming tables with titles like 'Main Table
Customers' which, of course, causes no end of hassle later.

:)

I'm getting there, thank you both for responding.
 

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

Back
Top