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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Expression Builder Problem

Status
Not open for further replies.

Jaxfan56

Technical User
Jan 7, 2005
3
US
Hello All,
I am in a military unit and am creating a database to track personal information about our battalion. The battalion is broken down into companies, which are then broken down into squads. I have created a main table which includes where each person is assigned. I then created a query to show only those assigned to "A" company and arranged it via squad number. I then created a report based on this Query and it looks fine. I am now trying to write an expression to count the number of names assigned to each company. The following is a shortened version of my report.

Company Commander Rank Last name
Company CPO Rank Last Name

Squad 1
Squad Leader Rank Last Name
Assistant Squad Leader Rank Last Name
Rank Last Name
Rank Last Name

This continues for all the squads. I inserted a text box labeled Total Assigned into the footer of the report. I set the control source to =Count([Last Name])

This worked in performing the calculation, but re-arranges the report so that anything without a Last name (The spaces squad labels) was moved to the top of the report, and the rows with last names were juggled around. Is there a way to perform this function without the report re-arranging?
Thanks For you Help.
 
It sounds like you aren't using the report Sorting and Grouping dialog.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top