![]() |
|
|
#1
|
|||
|
|||
|
Trying to show the total of these textbox controls.
I tried this: =[FinRes]+[Gap]+[Vsc1]+[Vsc2]+[OtherF&I] in the control source of the textbox control but that only works if there are numbers in all the fields. So I try this: =IIf(IsNull([FinRes]+[Gap]+[Vsc1]+[Vsc2]+[OtherF&I]),0,([FinRes]+[Gap]+[Vsc1]+[Vsc2]+[OtherF&I])) But same thing. How do I get the total to work if some of the fields are empty? Sorry, just learning Access, thanks for any help. |
|
#2
|
||||
|
||||
|
Use the Nz() function.
=Nz([FinRes],0)+Nz([Gap],0)+Nz([Vsc1],0)+Nz([Vsc2],0)+Nz([OtherF&I],0)
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07 If your issue is resolved...follow this link for directions on how to use the Solved thread tool! Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus" |
|
#3
|
|||
|
|||
|
Thanks for answering; I was beginning to wonder if anyone was on here helping. I finally figured it out and that's exactly what I did. I can't believe something so simple is so hard in Access (compared to Excel - which is what I am used to). Thanks again.
|
|
#4
|
||||
|
||||
|
Excellent! You always learn more when you solve it yourself anyway.
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07 If your issue is resolved...follow this link for directions on how to use the Solved thread tool! Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus" |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Keeping text in a report textbox | Hawkx1 | Reports | 2 | 11-13-2008 01:11 PM |
| A code to change textbox property in a form? | mujaqo | Access | 1 | 08-09-2008 11:09 PM |
| Textbox will not allow input | cwf | Forms | 0 | 04-04-2008 02:08 PM |
| dynamic textbox | vam | Programming | 1 | 06-04-2006 06:59 AM |
| Report will not print a bound textbox | vvrt | Reports | 0 | 03-16-2006 11:16 AM |