A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Event error - pls help.



 
 
Thread Tools Display Modes
  #1  
Old September 5th, 2007, 10:14 AM posted to microsoft.public.access.reports
Catalin
external usenet poster
 
Posts: 36
Default Event error - pls help.

Dear friends,

I am confronting with an error and I do not know why it appears and how I
can get rid of it.

The error comes when I write a code in ANY of the event methods of the
report - On Activate, On Open etc.

The error message is: "The expression On Activate you entered as the event
property setting produced the following error: A problem occured while Access
was communicating with the OLE server or Activex control"

On Activate is replaced with On Open if I use this event. Now even if I
delete the code, the error still persists and I cannot get rid of it unless I
replace the report with the one from my safety copy. And the story repeats
again.

The code I am inserting is "docmd.maximized". Thats all. Immediately after
that I get some other errors inside report - "Name?" - for some controls
which contains the following kind of expressions : =Iif(test=0,
"profile","operations")


Thanks in advance for your support.

Catalin
  #2  
Old September 5th, 2007, 01:10 PM posted to microsoft.public.access.reports
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default Event error - pls help.

Give us an exzample of the VBA code (entire procedure) that you're using as
the event procedure's programming. You are not putting "DoCmd.Maximize"
directly in the box next to "On Activate" on the Event tab in the Properties
popup window, are you?

--

Ken Snell
MS ACCESS MVP


"Catalin" wrote in message
...
Dear friends,

I am confronting with an error and I do not know why it appears and how I
can get rid of it.

The error comes when I write a code in ANY of the event methods of the
report - On Activate, On Open etc.

The error message is: "The expression On Activate you entered as the event
property setting produced the following error: A problem occured while
Access
was communicating with the OLE server or Activex control"

On Activate is replaced with On Open if I use this event. Now even if I
delete the code, the error still persists and I cannot get rid of it
unless I
replace the report with the one from my safety copy. And the story repeats
again.

The code I am inserting is "docmd.maximized". Thats all. Immediately after
that I get some other errors inside report - "Name?" - for some controls
which contains the following kind of expressions : =Iif(test=0,
"profile","operations")


Thanks in advance for your support.

Catalin



  #3  
Old September 5th, 2007, 01:20 PM posted to microsoft.public.access.reports
Catalin
external usenet poster
 
Posts: 36
Default Event error - pls help.

Yes I do.
I put only "DoCmd.Maximize".

Catalin

"Ken Snell (MVP)" wrote:

Give us an exzample of the VBA code (entire procedure) that you're using as
the event procedure's programming. You are not putting "DoCmd.Maximize"
directly in the box next to "On Activate" on the Event tab in the Properties
popup window, are you?

--

Ken Snell
MS ACCESS MVP


"Catalin" wrote in message
...
Dear friends,

I am confronting with an error and I do not know why it appears and how I
can get rid of it.

The error comes when I write a code in ANY of the event methods of the
report - On Activate, On Open etc.

The error message is: "The expression On Activate you entered as the event
property setting produced the following error: A problem occured while
Access
was communicating with the OLE server or Activex control"

On Activate is replaced with On Open if I use this event. Now even if I
delete the code, the error still persists and I cannot get rid of it
unless I
replace the report with the one from my safety copy. And the story repeats
again.

The code I am inserting is "docmd.maximized". Thats all. Immediately after
that I get some other errors inside report - "Name?" - for some controls
which contains the following kind of expressions : =Iif(test=0,
"profile","operations")


Thanks in advance for your support.

Catalin




  #4  
Old September 5th, 2007, 02:51 PM posted to microsoft.public.access.reports
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default Event error - pls help.

That is not the way to do it.

In that box, select "[Event Procedure]" from the dropdown box. Then click on
the three-dot button at far right of the box -- this will open the Visual
Basic Editor (VBE), and you'll see that the cursor is on a blank line
between a code line above it (Private Sub xxxxx) and a code line below it
(End Sub). Type the DoCmd.Maximize in that blank line. Close the VBE. Save
the form. Close the form. Open the form in normal view; it should work for
you now.

--

Ken Snell
MS ACCESS MVP



"Catalin" wrote in message
...
Yes I do.
I put only "DoCmd.Maximize".

Catalin

"Ken Snell (MVP)" wrote:

Give us an exzample of the VBA code (entire procedure) that you're using
as
the event procedure's programming. You are not putting "DoCmd.Maximize"
directly in the box next to "On Activate" on the Event tab in the
Properties
popup window, are you?

--

Ken Snell
MS ACCESS MVP


"Catalin" wrote in message
...
Dear friends,

I am confronting with an error and I do not know why it appears and how
I
can get rid of it.

The error comes when I write a code in ANY of the event methods of the
report - On Activate, On Open etc.

The error message is: "The expression On Activate you entered as the
event
property setting produced the following error: A problem occured while
Access
was communicating with the OLE server or Activex control"

On Activate is replaced with On Open if I use this event. Now even if I
delete the code, the error still persists and I cannot get rid of it
unless I
replace the report with the one from my safety copy. And the story
repeats
again.

The code I am inserting is "docmd.maximized". Thats all. Immediately
after
that I get some other errors inside report - "Name?" - for some
controls
which contains the following kind of expressions : =Iif(test=0,
"profile","operations")


Thanks in advance for your support.

Catalin






  #5  
Old September 5th, 2007, 06:18 PM posted to microsoft.public.access.reports
Catalin
external usenet poster
 
Posts: 36
Default Event error - pls help.

Dear Ken,

I am sorry that I misslead you. I didn't carefuly read your reply. When I
said that I wrote only "docmd.maximize" I meant inside the "private"
procedure within VBE.

So, I have respected all the rules concernng events and still the error
persists.

What can be wrong?

Catalin

"Ken Snell (MVP)" wrote:

That is not the way to do it.

In that box, select "[Event Procedure]" from the dropdown box. Then click on
the three-dot button at far right of the box -- this will open the Visual
Basic Editor (VBE), and you'll see that the cursor is on a blank line
between a code line above it (Private Sub xxxxx) and a code line below it
(End Sub). Type the DoCmd.Maximize in that blank line. Close the VBE. Save
the form. Close the form. Open the form in normal view; it should work for
you now.

--

Ken Snell
MS ACCESS MVP



"Catalin" wrote in message
...
Yes I do.
I put only "DoCmd.Maximize".

Catalin

"Ken Snell (MVP)" wrote:

Give us an exzample of the VBA code (entire procedure) that you're using
as
the event procedure's programming. You are not putting "DoCmd.Maximize"
directly in the box next to "On Activate" on the Event tab in the
Properties
popup window, are you?

--

Ken Snell
MS ACCESS MVP


"Catalin" wrote in message
...
Dear friends,

I am confronting with an error and I do not know why it appears and how
I
can get rid of it.

The error comes when I write a code in ANY of the event methods of the
report - On Activate, On Open etc.

The error message is: "The expression On Activate you entered as the
event
property setting produced the following error: A problem occured while
Access
was communicating with the OLE server or Activex control"

On Activate is replaced with On Open if I use this event. Now even if I
delete the code, the error still persists and I cannot get rid of it
unless I
replace the report with the one from my safety copy. And the story
repeats
again.

The code I am inserting is "docmd.maximized". Thats all. Immediately
after
that I get some other errors inside report - "Name?" - for some
controls
which contains the following kind of expressions : =Iif(test=0,
"profile","operations")


Thanks in advance for your support.

Catalin






  #6  
Old September 6th, 2007, 02:06 PM posted to microsoft.public.access.reports
Catalin
external usenet poster
 
Posts: 36
Default Event error - pls help.

Does somebody have any ideea about this error?

Thanx

Catalin

"Catalin" wrote:

Dear friends,

I am confronting with an error and I do not know why it appears and how I
can get rid of it.

The error comes when I write a code in ANY of the event methods of the
report - On Activate, On Open etc.

The error message is: "The expression On Activate you entered as the event
property setting produced the following error: A problem occured while Access
was communicating with the OLE server or Activex control"

On Activate is replaced with On Open if I use this event. Now even if I
delete the code, the error still persists and I cannot get rid of it unless I
replace the report with the one from my safety copy. And the story repeats
again.

The code I am inserting is "docmd.maximized". Thats all. Immediately after
that I get some other errors inside report - "Name?" - for some controls
which contains the following kind of expressions : =Iif(test=0,
"profile","operations")


Thanks in advance for your support.

Catalin

  #7  
Old September 6th, 2007, 02:48 PM posted to microsoft.public.access.reports
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default Event error - pls help.

I'm tied up on project, and will post a reply later.
--

Ken Snell
MS ACCESS MVP


"Catalin" wrote in message
...
Does somebody have any ideea about this error?



  #8  
Old September 7th, 2007, 03:24 AM posted to microsoft.public.access.reports
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default Event error - pls help.

By the combination of the problems that you describe, it appears that the
report is becoming corrupted somehow when you try to use it. The fact that
your textboxes start to show "#Name?" errors indicates that the report has
"lost" its recordsource, or the textbox with the expression in it has the
same name as a field in the recordsource.

What is the name of the textbox with the IIf expression (that you posted) as
the control source?
--

Ken Snell
MS ACCESS MVP




"Catalin" wrote in message
...
Dear Ken,

I am sorry that I misslead you. I didn't carefuly read your reply. When I
said that I wrote only "docmd.maximize" I meant inside the "private"
procedure within VBE.

So, I have respected all the rules concernng events and still the error
persists.

What can be wrong?

Catalin

"Ken Snell (MVP)" wrote:

That is not the way to do it.

In that box, select "[Event Procedure]" from the dropdown box. Then click
on
the three-dot button at far right of the box -- this will open the Visual
Basic Editor (VBE), and you'll see that the cursor is on a blank line
between a code line above it (Private Sub xxxxx) and a code line below it
(End Sub). Type the DoCmd.Maximize in that blank line. Close the VBE.
Save
the form. Close the form. Open the form in normal view; it should work
for
you now.

--

Ken Snell
MS ACCESS MVP



"Catalin" wrote in message
...
Yes I do.
I put only "DoCmd.Maximize".

Catalin

"Ken Snell (MVP)" wrote:

Give us an exzample of the VBA code (entire procedure) that you're
using
as
the event procedure's programming. You are not putting
"DoCmd.Maximize"
directly in the box next to "On Activate" on the Event tab in the
Properties
popup window, are you?

--

Ken Snell
MS ACCESS MVP


"Catalin" wrote in message
...
Dear friends,

I am confronting with an error and I do not know why it appears and
how
I
can get rid of it.

The error comes when I write a code in ANY of the event methods of
the
report - On Activate, On Open etc.

The error message is: "The expression On Activate you entered as the
event
property setting produced the following error: A problem occured
while
Access
was communicating with the OLE server or Activex control"

On Activate is replaced with On Open if I use this event. Now even
if I
delete the code, the error still persists and I cannot get rid of it
unless I
replace the report with the one from my safety copy. And the story
repeats
again.

The code I am inserting is "docmd.maximized". Thats all. Immediately
after
that I get some other errors inside report - "Name?" - for some
controls
which contains the following kind of expressions : =Iif(test=0,
"profile","operations")


Thanks in advance for your support.

Catalin








 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:02 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.