473,395 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

#Name? in Calculated Control in Access 2003

Hi All,

I have the expression =IIf([Form].[NewRecord],[Form].[CurrentRecord],
[Form].[Recordset].[RecordCount]) assigned to the ControlSource of a
Text Box. This functions correctly in Access 2000 but in Access 2003
the #Name? error is displayed.

I don't have any broken references and I have tried this originally
with the file unconverted to 2003 and thence converted to 2003 but
still I get #Name? displayed.

Thanks,
Michael Holberton
Hospedaje Los Jardines & Sacred Valley Mountain Bike Tours
Cusco Database Development and Cycling Services
http://www.machawasi.com/
http://machawasi.blogspot.com/
http://databaseservices.blogspot.com
http://serviciosdeciclismodelperu.googlepages.com

Jun 4 '07 #1
5 4408
Some further info. It functions fine in Access 2002 (XP). So, it
appears to be definitely something related to the 2003 version.
Anybody have some insight for me?

Thanks,
Michael Holberton
Hospedaje Los Jardines & Sacred Valley Mountain Bike Tours
Cusco Database Development and Cycling Services
http://www.machawasi.com/
http://machawasi.blogspot.com/
http://databaseservices.blogspot.com
http://serviciosdeciclismodelperu.googlepages.com
Jun 4 '07 #2
On Jun 4, 4:46 pm, ServiciosDeCiclismoDelP...@gmail.com wrote:
Some further info. It functions fine in Access 2002 (XP). So, it
appears to be definitely something related to the 2003 version.

Anybody have some insight for me?

Thanks,
Michael Holberton
Hospedaje Los Jardines & Sacred Valley Mountain Bike Tours
Cusco Database Development and Cycling Serviceshttp://www.machawasi.com/http://machawasi.blogspot.com/http://databaseservices.blogspot.comhttp://serviciosdeciclismodelperu.googlepages.com
Not sure, as I still live in Acc97 world but what about =IIf([Form].
[NewRecord],[Form].[CurrentRecord],
[Form].[RecordsetClone].[RecordCount])

Notice the RecordsetClone property replacing Recordset. Works in Acc97
and in later versions with DAO referenced.

Jun 4 '07 #3
On Jun 4, 3:12 pm, spier <spie...@yahoo.comwrote:
On Jun 4, 4:46 pm, ServiciosDeCiclismoDelP...@gmail.com wrote:
Some further info. It functions fine in Access 2002 (XP). So, it
appears to be definitely something related to the 2003 version.
Anybody have some insight for me?
Thanks,
Michael Holberton
Hospedaje Los Jardines & Sacred Valley Mountain Bike Tours
Cusco Database Development and Cycling Serviceshttp://www.machawasi.com/http://machawasi.blogspot.com/http://databas...

Not sure, as I still live in Acc97 world but what about =IIf([Form].
[NewRecord],[Form].[CurrentRecord],
[Form].[RecordsetClone].[RecordCount])

Notice the RecordsetClone property replacing Recordset. Works in Acc97
and in later versions with DAO referenced.
Tried that also. Makes no difference. :(

Jun 4 '07 #4
Bump

Jun 5 '07 #5
Sone more information.

If I create a wrapper function as per the following and assign it to
the ControlSource as =mlngGetRecordCount() I get what I need.

Private Function mlngGetRecordCount() As Long

On Error GoTo mlngGetRecordCountErr

If Me.NewRecord Then
mlngGetRecordCount = Me.CurrentRecord
Else
mlngGetRecordCount = Me.RecordsetClone.RecordCount
End If

mlngGetRecordCountExit:
Exit Function

mlngGetRecordCountErr:
Call pErrorHandler("Form." & Me.name, "mlngGetRecordCount")
Resume mlngGetRecordCountExit

End Function

However, this doesn't answer why what works in 2000 & 2002 is not
working in 2003 and has me wondering what other anomalies 2003 has.

Jun 5 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jeremy Weiss | last post by:
I've got a temp table that contains the fields: amountowed, amountpaid, and balanced. I've got a form that shows this information and I've set it up so that when the amountpaid field is changed it...
5
by: Richard Holliingsworth | last post by:
Hello: Thanks for reading this post. I need to create a metrics (form or report - I don't care which) to display calculated fields about the database (A2002 front end to SQL Server 2K) 1) I...
0
by: Del | last post by:
Thanks in advance for any help. I have a database that was created in Access 2000. Several users have been upgraded to Access 2003. Since upgrading to 2003 we have noticed that one of the...
2
by: hhathome | last post by:
In my report I have a calculated DateDiff Field, I also have a calculated count field. I'm trying to get a total of the DateDiff field and dividing it by the count field and I'm having problems --...
7
by: Neil | last post by:
I have a check box on a form that's bound to a function that returns a True/False value. When the user clicks on the check box, I run some code through the MouseDown event. Everything works fine. ...
15
by: Jimmy Stewart | last post by:
I want to use a calculated function for the caption on my tab controls. I used the following code: Me.Page28.Caption = "Expenses & "]" This should display the following: " Expenses " where...
3
by: kelley.l.turner | last post by:
Hi all, I am very new to MS Access so please bear with me! I have created a simple calculated field in my data entry form, yet when I view my data table or try to generate a report based on...
3
by: Robert | last post by:
I ask because, in Access help, it does not list is as such, however, I had a table with a field named 'Name'. If I put a control on a form and used this as the control source no problems, but if I...
2
by: jcf378 | last post by:
hi all. I have a form which contains a calculated control ("days") that outputs the # of days between two dates (DateDiff command between the fields and ). However, when I click "Filter by...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.