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!

Report data problem

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,

I have a query that gives me results that are in this format

Activity Sum of Daily - These are the column names
activityName a number - and the data
activityName a number

This gives me 13 activites and a sum of their times.
On my report I have 13 text boxes for the numbers. For instance; In the Crafts box, I need the number where the Activity is Crafts.

I need to put the numbers in the text boxes but I am not sure how to do it and I didn't have any luck trying to use a where clause in the text box's control source.

Any help would be appreaciated,

Gary
 
Assuming you want your report to look like this:

Crafts 10
Activity2 12
Activity3 8
etc.

You don't need a separate text box for each of the 13 activities. In the detail section of your report place 1 text box for the activity. Click on the control source and look at the drop-down list of fields from your query. (The report's record source is your query. That's why you see a list of fields from your query.) Select "Activity". Add a second text box for the Sums and once again select the appropriate field for it's control source.

As an alternative, I suggest using the report wizard. Just base the report on your query and answer the questions posed to you. The report can always be modified after.

HTH


 
Hi,
Yeah that helped alot, it works now thanks.

Only problem is I need to run every number through a function and I can't seem to do that now. Everything comes up #Error.

I also need to total up the hours, and nothing seems to work

Thanks for the help

Gary
 
What's the function?

To get the total hours add an unbound text box to the detail footer. Set the control source to:

=sum([NameOfTextBoxControlInDetailSectionThatHoldsHours])
 
Hi,

The function converts a time to hours and minutes. It takes the number in as a long and returns it as a string in hh:mm format. I can't total it up becuase it's now a string.

thanks for the help,

Gary
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top