Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 12th, 2005, 05:16 PM
Registered User
 
Join Date: Sep 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default invalid reference

Hi, there:

I got an error message as "You entered an expression that has an invalid reference to the property Page". The Page is the name of one field in my table. The code is here:

Private Sub DupAF()
'Dim rs As Recordset
Set rs = Form.RecordsetClone
'Set rs = db.OpenRecordset("select * from [" & Me.RecordSource & "]")
If Not (rs.EOF And rs.BOF) Then
 rs.MoveLast

 FieldOffice = rs![FieldOffice]
 Project = rs![Project]
 Segment = rs![Segment]
 UniqueIdentifier = rs![UniqueIdentifier]
 Page = rs![Page]
 TotalPages = rs![TotalPages]
 rs.Close
 Set rs = Nothing

End If

End Sub


By the way, the data type of Page and TotalPages are exactly same, but only Page got the error.

Is there anybody can find problem for me?

Your kind help is so appreciated!

NeoCat
 
Old September 12th, 2005, 07:38 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

NeoCat,
Page is a reserved word. You need to change the name of the field on the table, form etc. to something else.

Kevin

dartcoach
 
Old September 13th, 2005, 01:24 PM
Registered User
 
Join Date: Sep 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you, Kevin. I have changed the name.

NeoCat
 
Old September 13th, 2005, 01:58 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default

NeoCat,

Just making sure, this fixed your problem?

Kevin

dartcoach
 
Old September 20th, 2005, 12:04 PM
Registered User
 
Join Date: Sep 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Kevin,

Yes, it fixed my problem. Thanks again for your kind support.

NeoCat






Similar Threads
Thread Thread Starter Forum Replies Last Post
invalid reference to property rashi Access 6 September 28th, 2007 11:39 AM
% is an invalid character? owoade .NET Web Services 1 August 12th, 2007 12:32 PM
invalid syntax near ")" charleshuff2002 ADO.NET 1 March 8th, 2007 03:21 PM
Invalid bracketing of name Corey Access 3 February 28th, 2007 07:39 PM
Invalid use of property hanna VB.NET 2002/2003 Basics 1 March 31st, 2004 06:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.