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!

Still lost!!! Maybe I'm not getting my Point across 1

Status
Not open for further replies.

chubby

Programmer
Apr 28, 2001
278
US
I hope this will be it. Sorry to keep bugging you guy's.
I already have my queries built. I wanted to know the number of personnel in UIC 2253. So did this:

Using the Milpers date table: (query looks like this)

Field [Last Name] [UIC]
Table Milpers Milpers
Total Group count
Show: no YES
criteria: none "2253"

Results: CountOfuic 201

Field [Last Name] [Officers]
Table Milpers Milpers
Total Group count
Show: no YES
criteria: none "Officers"

results from query: CountOfOfficers 21

Now, how can I add the two together in my report...
The DCount did not work??
 
One more try! Your query results in 1 line of data with 1 text box it appears if the definition you placed here is exactly the same as your query. If this is the case you DO NOT need your queries to accomplish what you are doing separately in the queries. The DCount function I described will do what you want, we just need to add some criteria to it. Make a textbox on your report and set it's control source to this:

[tt]
=Dcount("[UIC]","Milpers","[UIC]='2253'")+Dcount("[Officers]","Milpers","[Officers]='Officers'")
[/tt]

What I can't figure out is why you need the last name field if you're not showing it, not grouping on it (because it's not shown) and not using it for criteria.. This is the the hole in my solution because I can't figure out why it's there from your post. Try my solution, see if it helps.

Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top