Urgent Record Count Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This is very odd.

I have an application with many forms and subforms.

Each form and subform has a field called SRC.

For a TEST form running under Access XP:-
If the SRC Control Source =Count(*). The SRC displays #Name
If the SRC Control Source =[Form].[RecordsetClone].[RecordCount]. The SRC
displays the correct record count.

For the same TEST form running under Access 2003:-
If the SRC Control Source =Count(*). The SRC displays the correct record
count.
If the SRC Control Source =[Form].[RecordsetClone].[RecordCount]. The SRC
displays #Name

I've tried many different ways of qualifying the form/subform etc. but to no
avail.

Is there one Control Source that I can use to count the records that will
work consistently in Access XP and 2003?
 
This should work in both versions:

SRC Control Source =DCount("*", [Form].[Recordsource])
 
Hi Ken, Thanks for the help but SRC now displays #Error

Ken Snell said:
This should work in both versions:

SRC Control Source =DCount("*", [Form].[Recordsource])


--

Ken Snell
<MS ACCESS MVP>

jez123456 said:
This is very odd.

I have an application with many forms and subforms.

Each form and subform has a field called SRC.

For a TEST form running under Access XP:-
If the SRC Control Source =Count(*). The SRC displays #Name
If the SRC Control Source =[Form].[RecordsetClone].[RecordCount]. The SRC
displays the correct record count.

For the same TEST form running under Access 2003:-
If the SRC Control Source =Count(*). The SRC displays the correct record
count.
If the SRC Control Source =[Form].[RecordsetClone].[RecordCount]. The SRC
displays #Name

I've tried many different ways of qualifying the form/subform etc. but to no
avail.

Is there one Control Source that I can use to count the records that will
work consistently in Access XP and 2003?
 
Post the expression you're using for the control source based on what I
posted.

--

Ken Snell
<MS ACCESS MVP>

jez123456 said:
Hi Ken, Thanks for the help but SRC now displays #Error

Ken Snell said:
This should work in both versions:

SRC Control Source =DCount("*", [Form].[Recordsource])


--

Ken Snell
<MS ACCESS MVP>

jez123456 said:
This is very odd.

I have an application with many forms and subforms.

Each form and subform has a field called SRC.

For a TEST form running under Access XP:-
If the SRC Control Source =Count(*). The SRC displays #Name
If the SRC Control Source =[Form].[RecordsetClone].[RecordCount]. The SRC
displays the correct record count.

For the same TEST form running under Access 2003:-
If the SRC Control Source =Count(*). The SRC displays the correct record
count.
If the SRC Control Source =[Form].[RecordsetClone].[RecordCount]. The SRC
displays #Name

I've tried many different ways of qualifying the form/subform etc. but
to
no
avail.

Is there one Control Source that I can use to count the records that will
work consistently in Access XP and 2003?
 
=DCount("*", [Form].[Recordsource])

Does [Form] mean [Form] or the main form name or the subform name?


Ken Snell said:
Post the expression you're using for the control source based on what I
posted.

--

Ken Snell
<MS ACCESS MVP>

jez123456 said:
Hi Ken, Thanks for the help but SRC now displays #Error

Ken Snell said:
This should work in both versions:

SRC Control Source =DCount("*", [Form].[Recordsource])


--

Ken Snell
<MS ACCESS MVP>

This is very odd.

I have an application with many forms and subforms.

Each form and subform has a field called SRC.

For a TEST form running under Access XP:-
If the SRC Control Source =Count(*). The SRC displays #Name
If the SRC Control Source =[Form].[RecordsetClone].[RecordCount]. The SRC
displays the correct record count.

For the same TEST form running under Access 2003:-
If the SRC Control Source =Count(*). The SRC displays the correct record
count.
If the SRC Control Source =[Form].[RecordsetClone].[RecordCount]. The SRC
displays #Name

I've tried many different ways of qualifying the form/subform etc. but to
no
avail.

Is there one Control Source that I can use to count the records that will
work consistently in Access XP and 2003?
 
[Form] is a literal entry. Do not replace it with anything.

It tells ACCESS to look at the recordsource of the form on which the control
is placed.

Are you wanting to get the record count of a subform and show it in a
control on the main form? Or get the record count of the main form and show
it in a control on a subform?

--

Ken Snell
<MS ACCESS MVP>


jez123456 said:
=DCount("*", [Form].[Recordsource])

Does [Form] mean [Form] or the main form name or the subform name?


Ken Snell said:
Post the expression you're using for the control source based on what I
posted.

--

Ken Snell
<MS ACCESS MVP>

jez123456 said:
Hi Ken, Thanks for the help but SRC now displays #Error

:

This should work in both versions:

SRC Control Source =DCount("*", [Form].[Recordsource])


--

Ken Snell
<MS ACCESS MVP>

This is very odd.

I have an application with many forms and subforms.

Each form and subform has a field called SRC.

For a TEST form running under Access XP:-
If the SRC Control Source =Count(*). The SRC displays #Name
If the SRC Control Source =[Form].[RecordsetClone].[RecordCount].
The
SRC
displays the correct record count.

For the same TEST form running under Access 2003:-
If the SRC Control Source =Count(*). The SRC displays the correct record
count.
If the SRC Control Source =[Form].[RecordsetClone].[RecordCount].
The
SRC
displays #Name

I've tried many different ways of qualifying the form/subform etc.
but
to
no
avail.

Is there one Control Source that I can use to count the records
that
will
work consistently in Access XP and 2003?
 
The record count is of a subform shown in a textbox on the same subform.

Ken Snell said:
[Form] is a literal entry. Do not replace it with anything.

It tells ACCESS to look at the recordsource of the form on which the control
is placed.

Are you wanting to get the record count of a subform and show it in a
control on the main form? Or get the record count of the main form and show
it in a control on a subform?

--

Ken Snell
<MS ACCESS MVP>


jez123456 said:
=DCount("*", [Form].[Recordsource])

Does [Form] mean [Form] or the main form name or the subform name?


Ken Snell said:
Post the expression you're using for the control source based on what I
posted.

--

Ken Snell
<MS ACCESS MVP>

Hi Ken, Thanks for the help but SRC now displays #Error

:

This should work in both versions:

SRC Control Source =DCount("*", [Form].[Recordsource])


--

Ken Snell
<MS ACCESS MVP>

This is very odd.

I have an application with many forms and subforms.

Each form and subform has a field called SRC.

For a TEST form running under Access XP:-
If the SRC Control Source =Count(*). The SRC displays #Name
If the SRC Control Source =[Form].[RecordsetClone].[RecordCount]. The
SRC
displays the correct record count.

For the same TEST form running under Access 2003:-
If the SRC Control Source =Count(*). The SRC displays the correct
record
count.
If the SRC Control Source =[Form].[RecordsetClone].[RecordCount]. The
SRC
displays #Name

I've tried many different ways of qualifying the form/subform etc. but
to
no
avail.

Is there one Control Source that I can use to count the records that
will
work consistently in Access XP and 2003?
 
Works fine for me in this situation....

What else can you tell me about your setup?
--

Ken Snell
<MS ACCESS MVP>


jez123456 said:
The record count is of a subform shown in a textbox on the same subform.

Ken Snell said:
[Form] is a literal entry. Do not replace it with anything.

It tells ACCESS to look at the recordsource of the form on which the control
is placed.

Are you wanting to get the record count of a subform and show it in a
control on the main form? Or get the record count of the main form and show
it in a control on a subform?

--

Ken Snell
<MS ACCESS MVP>


jez123456 said:
=DCount("*", [Form].[Recordsource])

Does [Form] mean [Form] or the main form name or the subform name?


:

Post the expression you're using for the control source based on what I
posted.

--

Ken Snell
<MS ACCESS MVP>

Hi Ken, Thanks for the help but SRC now displays #Error

:

This should work in both versions:

SRC Control Source =DCount("*", [Form].[Recordsource])


--

Ken Snell
<MS ACCESS MVP>

This is very odd.

I have an application with many forms and subforms.

Each form and subform has a field called SRC.

For a TEST form running under Access XP:-
If the SRC Control Source =Count(*). The SRC displays #Name
If the SRC Control Source
=[Form].[RecordsetClone].[RecordCount].
The
SRC
displays the correct record count.

For the same TEST form running under Access 2003:-
If the SRC Control Source =Count(*). The SRC displays the correct
record
count.
If the SRC Control Source
=[Form].[RecordsetClone].[RecordCount].
The
SRC
displays #Name

I've tried many different ways of qualifying the form/subform
etc.
but
to
no
avail.

Is there one Control Source that I can use to count the
records
that
will
work consistently in Access XP and 2003?
 
Back
Top