Code works in 2000 but error in 2003

  • Thread starter Thread starter Steve S
  • Start date Start date
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
 
On Mon, 16 Mar 2009 14:43:05 -0700, Steve S

Try it without the square brackets.

-Tom.
Microsoft Access MVP
 
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
 
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
 
Back
Top