If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
#error in calculated textbox that references subform
Hi. In Access 2007 I have an unbound textbox (called txtTotal) on the main
form that calculates a value. The ControlSource of txtTotal is an expression that subtracts a field on the subform from a field on the main form. When the subform has no records then the txtTotal says #error. It looks bad and also causes an error of "expression has no value" in my code. Help? Thanks!! |
#2
|
|||
|
|||
#error in calculated textbox that references subform
See:
Avoid #Error in form/report with no records at: http://allenbrowne.com/RecordCountError.html The article explains how the expression we commonly used in previous versions fails in A2007, and suggests using a VBA function to return the value as the expression works there. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Very Rusty User" Very Rusty wrote in message ... Hi. In Access 2007 I have an unbound textbox (called txtTotal) on the main form that calculates a value. The ControlSource of txtTotal is an expression that subtracts a field on the subform from a field on the main form. When the subform has no records then the txtTotal says #error. It looks bad and also causes an error of "expression has no value" in my code. |
#3
|
|||
|
|||
#error in calculated textbox that references subform
It worked! Thank you SO VERY much! I really appreciate your help.
|
Thread Tools | |
Display Modes | |
|
|