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
|
|||
|
|||
Calculation not working in A2007
Hi
I have just moved over to A2007, I have adatabase that worked fine in 2000, and 2003 on a form in the control source I have the calculation =[AvailableSpaces]-IIf([Events Subform].[Form].[RecordsetClone].[RecordCount]=0,0,[Events Subform].[Form]![Total Attendees]) Which just returns #Name? As I said this worked fine in 2003, is there any reason it doesnt work now? Thanks Phil |
#2
|
|||
|
|||
Calculation not working in A2007
Phil
"#Name" is Access' way of saying "I don't find anything spelled that way". This can happen when a reference is mispelled, or leaves something out. I wonder if you added in the main form's name in front of your "[Events Subform]..."? Something like: Forms!YourMainForm![Events Subform]!... (by the way, the bang ("!") more properly is used for collections/user-defined objects. You might want to check the syntax...) Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or psuedocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "Phil" wrote in message ... Hi I have just moved over to A2007, I have adatabase that worked fine in 2000, and 2003 on a form in the control source I have the calculation =[AvailableSpaces]-IIf([Events Subform].[Form].[RecordsetClone].[RecordCount]=0,0,[Events Subform].[Form]![Total Attendees]) Which just returns #Name? As I said this worked fine in 2003, is there any reason it doesnt work now? Thanks Phil |
#3
|
|||
|
|||
Calculation not working in A2007
Hi Jeff
Thanks for your reply I tried =[AvailableSpaces]-IIf([Forms]![Events]![Events Subform].[Form].[RecordsetClone].[RecordCount]=0,0,[Forms]![Events]![Events Subform].[Form].[Total Attendees]) Not sure if that was what you meant, but I still get the same result. The previous worked fine under 2000/2003 it is only 2007 that does not like it?? Thanks Phil "Jeff Boyce" wrote: Phil "#Name" is Access' way of saying "I don't find anything spelled that way". This can happen when a reference is mispelled, or leaves something out. I wonder if you added in the main form's name in front of your "[Events Subform]..."? Something like: Forms!YourMainForm![Events Subform]!... (by the way, the bang ("!") more properly is used for collections/user-defined objects. You might want to check the syntax...) Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or psuedocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "Phil" wrote in message ... Hi I have just moved over to A2007, I have adatabase that worked fine in 2000, and 2003 on a form in the control source I have the calculation =[AvailableSpaces]-IIf([Events Subform].[Form].[RecordsetClone].[RecordCount]=0,0,[Events Subform].[Form]![Total Attendees]) Which just returns #Name? As I said this worked fine in 2003, is there any reason it doesnt work now? Thanks Phil . |
#4
|
|||
|
|||
Calculation not working in A2007
Maybe it should be
[Forms]![Events Subform].[Form].[RecordsetClone].[RecordCount] and [Forms]![Events Subform].[Form].[Total Attendees] instead of your original [Events Subform].[Form].[RecordsetClone].[RecordCount] and [Events Subform].[Form]![Total Attendees]) Phil wrote: Hi Jeff Thanks for your reply I tried =[AvailableSpaces]-IIf([Forms]![Events]![Events Subform].[Form].[RecordsetClone].[RecordCount]=0,0,[Forms]![Events]![Events Subform].[Form].[Total Attendees]) Not sure if that was what you meant, but I still get the same result. The previous worked fine under 2000/2003 it is only 2007 that does not like it?? Thanks Phil Phil [quoted text clipped - 35 lines] . -- Please Rate the posting if helps you. Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200910/1 |
Thread Tools | |
Display Modes | |
|
|