Code works in 2000 but error in 2003

S

Steve S

Can anyone tell me why the following works as the control source for a text
box in AC2000 but produces a Name? error in AC2003?

=[TeamMembersSubform].[Form].[recordset].[RecordCount]

I have checked the library references on both and the references are in the
same order on both except 'OLE automation' is 3rd on the 2000 PC and 9th on
the 2003 PC
 
T

Tom van Stiphout

On Mon, 16 Mar 2009 14:43:05 -0700, Steve S

Try it without the square brackets.

-Tom.
Microsoft Access MVP
 
S

Steve S

When i remove the [ and ] and move the cursor to the next line Access puts
them back. I have tried replacing them with ( and ) but still have same
error -- #Name?
--
Steve S


Tom van Stiphout said:
On Mon, 16 Mar 2009 14:43:05 -0700, Steve S

Try it without the square brackets.

-Tom.
Microsoft Access MVP

Can anyone tell me why the following works as the control source for a text
box in AC2000 but produces a Name? error in AC2003?

=[TeamMembersSubform].[Form].[recordset].[RecordCount]

I have checked the library references on both and the references are in the
same order on both except 'OLE automation' is 3rd on the 2000 PC and 9th on
the 2003 PC
 
T

Tom van Stiphout

On Tue, 17 Mar 2009 20:14:01 -0700, Steve S

You are right. Sorry, I should have checked.

Workaround: move the code to the Form_Current event. Somethink like:
Private Sub Form_Current()
myTextbox.Value = Me.mySubform.Form.RecordsetClone.RecordCount
End Sub

-Tom.
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top