Hi There,
Am doing some basic forms in an Access Project.
Would like to add a Cancel command button and a Save/Close command
button to form.
Using the Command Button wizard I add a Close Form command
'docmd.close'. This seems pretty straightforward but produces an error
along the lines of;
The expression On Click you entered as the event property setting
produced an error while communicating with the OLE Server or ActiveX
control .... yadayada.
Can anyone help me with this please?
Cheers,
Peter Macaulay
emre ordek - 30 Sep 2005 09:52 GMT
> Hi There,
>
[quoted text clipped - 16 lines]
>
> Peter Macaulay
Robert Morley - 30 Sep 2005 15:57 GMT
Given the error you're getting, I'm assuming this isn't the problem, but
just in case...the Close command takes a couple of parameters. In its most
basic form, what you want is
DoCmd.Close acForm, Me.Name 'or type in the name of your form, but
Me.Name works even if you change the name, so it's good practice.
It sounds to me more like you might have a broken reference or something of
that nature. Try decompiling the project and re-compiling it, and see if
that narrows it down at all. (To decompile, run Access.exe from the start
line with the following parameters ...MSAccess.exe "MyProject.adp"
/decompile)
Rob
> Hi There,
>
[quoted text clipped - 16 lines]
>
> Peter Macaulay
Tazdaz - 06 Oct 2005 09:57 GMT
I've had the same problem.
The only way I could correct the fault was to create a new blank database,
and then import the original tables, forms etc into it.
Hope this helps
> Hi There,
>
[quoted text clipped - 16 lines]
>
> Peter Macaulay