Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DCount in lookup tables #ERROR 1

Status
Not open for further replies.

chubby

Programmer
Apr 28, 2001
278
US
The =Dcount work fine when using info from one table. But how do I get =DCount to work with lookup tables???

I used access anayze table and now I have 5 tables for 700 personel. Example below:

"TABLES NAME" [FIELDS]
1. Miplers Name, age, DOB, etc
2. Recall Address, PH #, Pger, cell
3. UIC Either 2253 or 1190
4. Rank/Remarks E1-E9, Enlisted or O1-06 Officers
5. Education/Training Courses,College, Tech schoo1, etc.


Some of the things I need to count in my Report:
1. # officers at 1190
2. # officers at 2253
3. # of total Enlisted that has college
4. # of Enlisted at 2253 with college only
When using =DCount I kept getting an #ERROR. DCount works fine but not when it comes to using information in lookup tables...

=DCount("[uic]","lookup to uic tbl","[uic]='32253' ")

I should have 100% of my probles solved...
FOR NOW!!! THANKS...



 
How is a "lookup table" different than a table? This is not an actual table type but one you are defining as a lookup table, so what does a lookup table contain for data and what is it's function, and why must you count from it instead of the tables directly? Joe Miller
joe.miller@flotech.net
 
Mine is not a solution, but perhaps a variation in search of the same solution.

I have a simple one page report based on a select query with one criteria based on one table.
The table contains survey records each with 10 different "x" or "blank" responses.
The query with hard coded criteria selects records from the table based on a 4 digit survey code which always results in more than 1 record.
The report simply provides a DCount(blah,blah) on the total record count from the query and a DCount("[Q1]","query name","[Q1]='X'")on each of the survey response fields. THIS WORKS.

THE PROBLEM OCCURS when...
In order to make the production of the report simpler I change the critera in the query to an input parameter, ie., [Enter the Survey Code to be Selected for Report]. The stand-alone query produces the same record count as when it was hardcoded, but now the report only returns "#Error" for every report field where DCount() was used.
I promise that the only change was from a hard coded criteria to an input criteria.
Any thoughts?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top