Problem with DoCmd.Close

gpurger

Registered User.
Local time
Yesterday, 22:02
Joined
Apr 21, 2004
Messages
66
I have a group form with extra buttons to print, review a report or close the form.

If I use a Macro then I can close the form.
I converted the macro to code and I get the error message:
A problem occured while Microsoft Access was communicating with the OLE server or ActiveX Control
*The expression may not result in the name of macro, ...........
*There may have been an error evaluating........


What am I doing wrong :confused:

Cheers

Gordon
 
I copied and pasted the form name but as I said it works as a macro.

Just realised that I should have put this on the VBA area- sorry :o

Gordon
 
I assume then that you didn't check the ref's...

So from a VBA window, do Tools->References and then look for anything that starts with 'Missing...' and then simply check it off.

???
 
Hi Ken,

Nothing starting with missing.
Gordon
 
What is the code you are using?

Try creating a new command button using the wizard and tell it to close the form.
 
Thanks for the help.
I have solved the problem by deleting the form and creating a new one.
The command works now even though it is exactly the same.
'The beauty of Micrsoft'. :rolleyes:

Cheers
 

Users who are viewing this thread

Back
Top Bottom