A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculation not working in A2007



 
 
Thread Tools Display Modes
  #1  
Old October 21st, 2009, 03:11 PM posted to microsoft.public.access.forms
Phil
external usenet poster
 
Posts: 606
Default 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  
Old October 21st, 2009, 03:53 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default 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  
Old October 22nd, 2009, 10:01 AM posted to microsoft.public.access.forms
Phil
external usenet poster
 
Posts: 606
Default 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  
Old October 22nd, 2009, 10:58 AM posted to microsoft.public.access.forms
AccessVandal via AccessMonster.com
external usenet poster
 
Posts: 461
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:46 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.