Recordcloneset.recordcount stopped working

K

Kat

Hi everyone,

I have the following in form control which worked fine until recently:

=IIf([Forms]![MainForm]![Subform].[Form]![Subsubform].[Form].[RecordSetClone].[RecordCount]
0,[Forms]![MainForm]![Subform].[Form]![Subsubform].[Form]![ControlField],0)

As I said, it worked fine, then a few days ago I opened the database
and I have #Names? in every control that uses RecordSetClone.

I have tried everything, it just does not make sense. I am now looking
to see if a needed reference was removed from references. I can't
think of anything else.

Anyone have any ideas?
 
G

Graham Mandeno

Hi Kat

Which version of Access are you using? There is a bug concerning this in
the Access 2007 beta.

If you are not using Access 2007, then try a "compact and repair". Also,
ensure that there are no syntax errors in your code by compiling your entire
project (use Debug>Compile form the VBA window menu).
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Kat said:
Hi everyone,

I have the following in form control which worked fine until recently:

=IIf([Forms]![MainForm]![Subform].[Form]![Subsubform].[Form].[RecordSetClone].[RecordCount]
0,[Forms]![MainForm]![Subform].[Form]![Subsubform].[Form]![ControlField],0)

As I said, it worked fine, then a few days ago I opened the database
and I have #Names? in every control that uses RecordSetClone.

I have tried everything, it just does not make sense. I am now looking
to see if a needed reference was removed from references. I can't
think of anything else.

Anyone have any ideas?
 
D

david epsom dot com dot au

also check that you don't have anything called 'recordsetclone'
also check that you aren't changing the subform RecordSource or RecordSet

(david)

Kat said:
Hi everyone,

I have the following in form control which worked fine until recently:

=IIf([Forms]![MainForm]![Subform].[Form]![Subsubform].[Form].[RecordSetClone].[RecordCount]
0,[Forms]![MainForm]![Subform].[Form]![Subsubform].[Form]![ControlField],0)

As I said, it worked fine, then a few days ago I opened the database
and I have #Names? in every control that uses RecordSetClone.

I have tried everything, it just does not make sense. I am now looking
to see if a needed reference was removed from references. I can't
think of anything else.

Anyone have any ideas?
 
G

Graham Mandeno

Hi Kat

Access 2006 doesn't exist! Assume you mean 2003.

Did you also try the Compact/Repair as I suggested?

Have you checked the things David suggested?

Next step is to try to decompile the code:

Create a shortcut to MSACCESS.EXE on your desktop, then
right-click>Properties. At the end of the Target line (After msaccess.exe")
add the full path to your database file (in quotes) then a space and then
/decompile.

The whole target line should look something like this:

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "C:\Some
Path\MyDB.mdb" /decompile

Save the shortcut and then double-click on it.

YOU SHOULD TAKE A BACKUP COPY OF YOUR DB FIRST TO BE SAFE.

When the database opens again, try to recompile the project and see it the
problem persists.
 

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