Syntax Error

J

JamesJ

I'm setting the following to as the Control Source of an unbound textbox to
display
the record number and the number of records being returned but Access 2007
tells me there's a syntax error.
This is copied and pasted from another post.

="Record # " & [CurrentRecord] & " of " & RecordsetClone].[RecordCount]

James
 
B

Beetle

You appear to be missing the opening bracket for RecordsetClone.
It should be;

="Record # " & [CurrentRecord] & " of " & [RecordsetClone].[RecordCount]
 
J

JamesJ

Ah. But now I'm getting #Name?
This should be in the Control Source of the Unbounf Textbox?

James

Beetle said:
You appear to be missing the opening bracket for RecordsetClone.
It should be;

="Record # " & [CurrentRecord] & " of " & [RecordsetClone].[RecordCount]


JamesJ said:
I'm setting the following to as the Control Source of an unbound textbox
to display
the record number and the number of records being returned but Access
2007 tells me there's a syntax error.
This is copied and pasted from another post.

="Record # " & [CurrentRecord] & " of " & RecordsetClone].[RecordCount]

James
 
F

fredg

Ah. But now I'm getting #Name?
This should be in the Control Source of the Unbounf Textbox?

James

Beetle said:
You appear to be missing the opening bracket for RecordsetClone.
It should be;

="Record # " & [CurrentRecord] & " of " & [RecordsetClone].[RecordCount]


JamesJ said:
I'm setting the following to as the Control Source of an unbound textbox
to display
the record number and the number of records being returned but Access
2007 tells me there's a syntax error.
This is copied and pasted from another post.

="Record # " & [CurrentRecord] & " of " & RecordsetClone].[RecordCount]

James

That works for me.
Check your references. Perhaps you're missing a needed one.

Open any module in Design view (or click Ctrl + G).
On the Tools menu, click References.
Click to clear the check box for the type library or object library
marked as "Missing:."

An alternative to removing the reference is to restore the referenced
file to the path specified in the References dialog box. If the
referenced file is in a new location, clear the "Missing:" reference
and create a new reference to the file in its new folder.

For even more information, see
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html
 
J

JamesJ

Nothing that is checked or otherwise is Missing.
Must be a corrupt db?

James

fredg said:
Ah. But now I'm getting #Name?
This should be in the Control Source of the Unbounf Textbox?

James

Beetle said:
You appear to be missing the opening bracket for RecordsetClone.
It should be;

="Record # " & [CurrentRecord] & " of " & [RecordsetClone].[RecordCount]


I'm setting the following to as the Control Source of an unbound
textbox
to display
the record number and the number of records being returned but Access
2007 tells me there's a syntax error.
This is copied and pasted from another post.

="Record # " & [CurrentRecord] & " of " & RecordsetClone].[RecordCount]

James

That works for me.
Check your references. Perhaps you're missing a needed one.

Open any module in Design view (or click Ctrl + G).
On the Tools menu, click References.
Click to clear the check box for the type library or object library
marked as "Missing:."

An alternative to removing the reference is to restore the referenced
file to the path specified in the References dialog box. If the
referenced file is in a new location, clear the "Missing:" reference
and create a new reference to the file in its new folder.

For even more information, see
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html
 
B

Beetle

Does the form itself have a RecordSource, or is it unbound?

If the latter I would think it would generate a run-time error
instead of #Name?, but I'm not sure what else to suggest
since it should work as I posted it.

JamesJ said:
Nothing that is checked or otherwise is Missing.
Must be a corrupt db?

James

fredg said:
Ah. But now I'm getting #Name?
This should be in the Control Source of the Unbounf Textbox?

James

You appear to be missing the opening bracket for RecordsetClone.
It should be;

="Record # " & [CurrentRecord] & " of " &
[RecordsetClone].[RecordCount]


I'm setting the following to as the Control Source of an unbound
textbox
to display
the record number and the number of records being returned but Access
2007 tells me there's a syntax error.
This is copied and pasted from another post.

="Record # " & [CurrentRecord] & " of " &
RecordsetClone].[RecordCount]

James

That works for me.
Check your references. Perhaps you're missing a needed one.

Open any module in Design view (or click Ctrl + G).
On the Tools menu, click References.
Click to clear the check box for the type library or object library
marked as "Missing:."

An alternative to removing the reference is to restore the referenced
file to the path specified in the References dialog box. If the
referenced file is in a new location, clear the "Missing:" reference
and create a new reference to the file in its new folder.

For even more information, see
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html
 
J

John W. Vinson

Nothing that is checked or otherwise is Missing.
Must be a corrupt db?

If it's in fact

="Record # " & [CurrentRecord] & " of " & RecordsetClone].[RecordCount]

you're missing an open square bracket, at least; in fact I don't believe that
you can refer to RecordsetClone in the control source of a textbox, only in
VBA code.

I've got some (fairly extensive and proprietary) code to display custom nav
buttons on a form based on a single-record recordset, and it explicitly uses a
recordsetcount to find the number, and explicitly sets the value of the
textbox.
James

fredg said:
Ah. But now I'm getting #Name?
This should be in the Control Source of the Unbounf Textbox?

James

You appear to be missing the opening bracket for RecordsetClone.
It should be;

="Record # " & [CurrentRecord] & " of " & [RecordsetClone].[RecordCount]


I'm setting the following to as the Control Source of an unbound
textbox
to display
the record number and the number of records being returned but Access
2007 tells me there's a syntax error.
This is copied and pasted from another post.

="Record # " & [CurrentRecord] & " of " & RecordsetClone].[RecordCount]

James

That works for me.
Check your references. Perhaps you're missing a needed one.

Open any module in Design view (or click Ctrl + G).
On the Tools menu, click References.
Click to clear the check box for the type library or object library
marked as "Missing:."

An alternative to removing the reference is to restore the referenced
file to the path specified in the References dialog box. If the
referenced file is in a new location, clear the "Missing:" reference
and create a new reference to the file in its new folder.

For even more information, see
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html
 
J

JamesJ

Beetle pointed out the missing bracket. I've since put the bracket in but
get #Name?

James

John W. Vinson said:
Nothing that is checked or otherwise is Missing.
Must be a corrupt db?

If it's in fact

="Record # " & [CurrentRecord] & " of " & RecordsetClone].[RecordCount]

you're missing an open square bracket, at least; in fact I don't believe
that
you can refer to RecordsetClone in the control source of a textbox, only
in
VBA code.

I've got some (fairly extensive and proprietary) code to display custom
nav
buttons on a form based on a single-record recordset, and it explicitly
uses a
recordsetcount to find the number, and explicitly sets the value of the
textbox.
James

fredg said:
On Sat, 21 Mar 2009 11:56:37 -0400, JamesJ wrote:

Ah. But now I'm getting #Name?
This should be in the Control Source of the Unbounf Textbox?

James

You appear to be missing the opening bracket for RecordsetClone.
It should be;

="Record # " & [CurrentRecord] & " of " &
[RecordsetClone].[RecordCount]


I'm setting the following to as the Control Source of an unbound
textbox
to display
the record number and the number of records being returned but Access
2007 tells me there's a syntax error.
This is copied and pasted from another post.

="Record # " & [CurrentRecord] & " of " &
RecordsetClone].[RecordCount]

James



That works for me.
Check your references. Perhaps you're missing a needed one.

Open any module in Design view (or click Ctrl + G).
On the Tools menu, click References.
Click to clear the check box for the type library or object library
marked as "Missing:."

An alternative to removing the reference is to restore the referenced
file to the path specified in the References dialog box. If the
referenced file is in a new location, clear the "Missing:" reference
and create a new reference to the file in its new folder.

For even more information, see
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html
 
J

JamesJ

All my forms have a recordsource.
It displays data properly.

James

Beetle said:
Does the form itself have a RecordSource, or is it unbound?

If the latter I would think it would generate a run-time error
instead of #Name?, but I'm not sure what else to suggest
since it should work as I posted it.

JamesJ said:
Nothing that is checked or otherwise is Missing.
Must be a corrupt db?

James

fredg said:
On Sat, 21 Mar 2009 11:56:37 -0400, JamesJ wrote:

Ah. But now I'm getting #Name?
This should be in the Control Source of the Unbounf Textbox?

James

You appear to be missing the opening bracket for RecordsetClone.
It should be;

="Record # " & [CurrentRecord] & " of " &
[RecordsetClone].[RecordCount]


I'm setting the following to as the Control Source of an unbound
textbox
to display
the record number and the number of records being returned but Access
2007 tells me there's a syntax error.
This is copied and pasted from another post.

="Record # " & [CurrentRecord] & " of " &
RecordsetClone].[RecordCount]

James



That works for me.
Check your references. Perhaps you're missing a needed one.

Open any module in Design view (or click Ctrl + G).
On the Tools menu, click References.
Click to clear the check box for the type library or object library
marked as "Missing:."

An alternative to removing the reference is to restore the referenced
file to the path specified in the References dialog box. If the
referenced file is in a new location, clear the "Missing:" reference
and create a new reference to the file in its new folder.

For even more information, see
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html
 

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