LittleGlory
Registered User.
- Local time
- Today, 13:35
- Joined
- Jul 25, 2001
- Messages
- 12
Hoping someone can please help. I am pretty good in Access but this is one that I can't get to work.
I have a form that has sub forms. I am performing calculations on my main form using fields from the sub forms. Normally this works fine. I have trouble with this when the query behind my sub form is empty. When this occurs, my main form shows an error message in the calculated fields.
For instance, I am calculating the total downtime on a machine. My sub form is using a query linked to another database and pulling in the amount of downtime. On my main form, the user can enter additional downtime. Then I add the 2 together (the number from the sub form and the main form).
I need the form to first check and see if the sub form is empty and if so, I need the main form to display only the number entered on itself, not try to add the subform number in as well. Basically, if there is nothing in the sub form I want my total downtime calculation to be just the number entered on the main form, and if the sub form is not empty, then it should be the sub form number and the mainform number added together.
Hopefully someone can help. I am working on this project for work and this is my final obstacle to getting it out.
Thanks.
I have a form that has sub forms. I am performing calculations on my main form using fields from the sub forms. Normally this works fine. I have trouble with this when the query behind my sub form is empty. When this occurs, my main form shows an error message in the calculated fields.
For instance, I am calculating the total downtime on a machine. My sub form is using a query linked to another database and pulling in the amount of downtime. On my main form, the user can enter additional downtime. Then I add the 2 together (the number from the sub form and the main form).
I need the form to first check and see if the sub form is empty and if so, I need the main form to display only the number entered on itself, not try to add the subform number in as well. Basically, if there is nothing in the sub form I want my total downtime calculation to be just the number entered on the main form, and if the sub form is not empty, then it should be the sub form number and the mainform number added together.
Hopefully someone can help. I am working on this project for work and this is my final obstacle to getting it out.
Thanks.