Subform on tab totals don't work

cclark9589

Registered User.
Local time
Today, 08:23
Joined
Sep 22, 2008
Messages
79
Not sure if I can adequately explain this so I've attached some screen shots that hopefully provide a better picture.

I have 3 subforms attached to my time card: one for billable hours, expenses, and non-chargeable hours. The subforms appear on tabbed pages on the time card. Below each subform there is a "Total" field. Totals display properly on the first two tabs; hours and expenses however no matter what I try I can't get the non-charge hours total to display. All I get is #Name? error and I think once #Error. Nothing that I've tried has worked.

Below is the code from the expense subform:
=[Time Cards Expense Subform].Form![Total Expenses]

Here is the code from the non-chargeable subform:
=[TimeCardNonChg Subform].[Form]![NonChgHrs]
As best as I can tell I'm grabbing from the proper location which I think is in the subform header area.
Could someone take a look at the screen shots and maybe let me know what the heck I'm doing wrong and how to fix it? Keep in mind I'm an Access idiot so you may have to go reaaalllll slow.
Thanks.
 
Last edited:
It would probably be easier if you provided the database instead of the screenshots.
 
The db is attached. So much for pictures worth a thousand words!

One never knows the feeling of humble and humility until taking on something you have no clue about! You've no idea how much I appreciate the help you have given me.

On a side note the pointers you gave me concerning automatically filling if form fields worked pretty good although there were some side effects that I'm still trying to resolve with that.

Thanks for the help.
 
Last edited:
Your problem is that you have used the subform name when referencing the control on it rather than the subform CONTAINER on the main form. Instead of this:

=[TimeCardNonChg Subform].[Form]![Non Chg Hrs]

You need this:

=[Time Cards].[Form]![Non Chg Hrs]


Oh, and by the way, I would not use spaces in object names either. It will cause plenty of grief as well as special characters.
 
Incredible, you do in mere minutes what I've struggled with for more than 4 hours! Am left a bit confused (more so than usual) about something.

I made the change as you suggested and now the total shows up, just what I've been trying to do. You said I was referencing the subform in the control instead of the CONTAINER which I'm understanding to mean the time cards form is the container. What I don't understand is how the totals for the other two subforms work as they reference the subform.

Can you shed some light on that for me?

I am trying to understand all that I've learned from your responses and those of others but I got to tell you, at times it is overwhelming. I'm trying to convince my employer to it would be cheaper to pay for a course instead all this trial by error! :-)

Again, thanks for your help with this.
 
Incredible, you do in mere minutes what I've struggled with for more than 4 hours! Am left a bit confused (more so than usual) about something.

I made the change as you suggested and now the total shows up, just what I've been trying to do. You said I was referencing the subform in the control instead of the CONTAINER which I'm understanding to mean the time cards form is the container. What I don't understand is how the totals for the other two subforms work as they reference the subform.

Can you shed some light on that for me?
The other containers on the other tabs are probably named the same as the subforms they hold (which is one of the only times that is a good thing in Access).

I would suggest taking a read on these two links from my website to see if this helps you understand subforms better:
Easy way to remember how to refer to subforms
How to refer to subforms in Control Sources

I am trying to understand all that I've learned from your responses and those of others but I got to tell you, at times it is overwhelming. I'm trying to convince my employer to it would be cheaper to pay for a course instead all this trial by error! :-)
I can agree to that. I do think that these two things might help you:
Crystal's Access Basics
FunctionX Access Tutorial


Again, thanks for your help with this.
That's why I am here - to help others who are exactly where I was 11 years ago.
 
Amazing. I took a look at the subforms and sure enough, the non-charge Name was Time Cards. I renamed it to remain consistent with the others and it changed the control source. Just for giggles I changed the control source to back to Time Cards and sure enough, #Name?

Now on to the next task. Again, thanks for the guidance and just as importanly, the patience to deal with the poster child for Access for Dummies!
 
...and just as importanly, the patience to deal with the poster child for Access for Dummies!
Don't put yourself down like that. Believe me, I've seen much worse and you only know what you know. Learning is like that: you do something, make a mistake, learn from it, make another mistake, learn from it, etc.

Now, if you never learned from the mistakes, then I would be giving up on things and you could call yourself that. But, right now, you aren't. You just don't know a lot about it yet and, believe me, there's a LOT to learn. I have been doing this for 11 years and I still am learning new things I didn't know about in it. So, hang in there. It gets better.
 
I've not been one to start getting into something and not be willing to learn. I'm smart enough to know I don't know diddly squat about a lot of stuff and when it comes to something like Access I've got no problem at all being very humble about the fact I know squat. I'm learning and as long as I can do that and manage to get this database to work, I'll be as happy as a geoduck at high tide!

It's kind of funny, people I work with come to me with all sorts of questions and needing help with Excel and consider me some sort of Guru. I'm proficient with it but really only consider myself a mid-level intermediate user and continue to learn something new most days. I've never really had the need to use Access that much until my current job. Doing all that I have to do and doing it in Excel is just too time consuming. I know that what I am working on right now will be a tremendous tool when it's done, especially if it works right! Then I can take some pride in having climbed the mountain.

Thanks for the words of support and I'm sure we'll be talking soon.
 

Users who are viewing this thread

Back
Top Bottom