423,851 Members | 2,762 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,851 IT Pros & Developers. It's quick & easy.

#Name? in Calculated Control in Access 2003

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
Bump

Jun 5 '07 #5

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.