473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Command button to display a report

Hi,

This must be a simple problem, I can't beleive I was unable to find a
solution on google, but anyway here's the problem:

I have a command button, in it's onclick property I have an event procedure:

Private Sub Command15_Click()
DoCmd.OpenReport "My Report", acViewPreview
End Sub

Now when I click the command button I get the following error:

"The expression on click you entered as the event property setting produced
the following error: a problem occured while MS Access was communicating
with the OLE server or ActiveX Control.. blah blah"
Nov 12 '05 #1
5 13026
The error message indicates that there is a general problem with your
database.

First, from the code window choose References on the Tools menu.
Does the word "MISSING" appear beside any references?
If so, see:
http://allenbrowne.com/ser-38.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Not Me" <su**@sumwhere.fake> wrote in message
news:bo**********@ucsnew1.ncl.ac.uk...

This must be a simple problem, I can't beleive I was unable to find a
solution on google, but anyway here's the problem:

I have a command button, in it's onclick property I have an event procedure:
Private Sub Command15_Click()
DoCmd.OpenReport "My Report", acViewPreview
End Sub

Now when I click the command button I get the following error:

"The expression on click you entered as the event property setting produced the following error: a problem occured while MS Access was communicating
with the OLE server or ActiveX Control.. blah blah"

Nov 12 '05 #2
"Allen Browne" <al*********@SeeSig.invalid> wrote in message
news:3f**********************@freenews.iinet.net.a u...
"Not Me" <su**@sumwhere.fake> wrote in message
news:bo**********@ucsnew1.ncl.ac.uk...
Now when I click the command button I get the following error:

"The expression on click you entered as the event property setting produced
the following error: a problem occured while MS Access was communicating
with the OLE server or ActiveX Control.. blah blah"

The error message indicates that there is a general problem with your
database.

First, from the code window choose References on the Tools menu.
Does the word "MISSING" appear beside any references?
If so, see:
http://allenbrowne.com/ser-38.html


Sadly I don't have that problem - any other ideas?

Chris
Nov 12 '05 #3
"Not Me" <su**@sumwhere.fake> wrote in message
news:bo**********@ucsnew1.ncl.ac.uk...
"Allen Browne" <al*********@SeeSig.invalid> wrote in message
news:3f**********************@freenews.iinet.net.a u...
"Not Me" <su**@sumwhere.fake> wrote in message
news:bo**********@ucsnew1.ncl.ac.uk...
Now when I click the command button I get the following error:

"The expression on click you entered as the event property setting

produced
the following error: a problem occured while MS Access was communicating with the OLE server or ActiveX Control.. blah blah"

The error message indicates that there is a general problem with your
database.

First, from the code window choose References on the Tools menu.
Does the word "MISSING" appear beside any references?
If so, see:
http://allenbrowne.com/ser-38.html


Sadly I don't have that problem - any other ideas?


Hmm I might be on the way to fixing it - I don't get the error if I create a
new form and copy&paste the button in so it must be to do with some other
controls..

Chris
Nov 12 '05 #4
wodge
1
This link solved the problem for me:

http://p2p.wrox.com/archive/access/2002-12/16.asp

Read post #4, by Hagai Gold - I followed the procedure and am now happy.

:)
Jun 22 '06 #5
Renaming the form worked, don't have to go through all those steps mentioned in the referred to link.

Joel
Jul 18 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: dondave | last post by:
hello all! is it possible to have a command button in an access form that will creat a report out of the current form with out the person having to go into reports?? is there a code needed...
9
by: Melissa | last post by:
What is the code to delete a command button from a form? Can the code be run from the click event of the button to be deleted? Thanks! Melissa
2
by: Johm | last post by:
I need some help in finding a way to remove the filter from the previous command. I open the report from a form where i have option group called Office.Depending on the option in the option...
2
by: Senthil | last post by:
Hi All I need to create an Excel report and create a command button and have to run a macro on the click event that will print all the pages in the Excel workbook. I am able to create the report...
1
by: fperri | last post by:
I hope that this is the right forum. I'm using VB to create a report in Excel. After the report is generated I put two buttons onto the title sheet. Both are for printing a part of the report. Here...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
9
by: larryimic | last post by:
I have created a Access production database that records good parts and bad parts to a table thru querys using macros and command buttons on a form. A report (part label) is printed each time a...
6
by: martin DH | last post by:
**Urgent Need** I'll throw out the basics and any assistance is very, very, very much appreciated! Access 2003 on XP On a form (frmMain) is an option group of check boxes (ReportFrame) from...
16
by: Steve | last post by:
I am working on a database that has a main menu, many sub-menus and some sub-sub-menus. They are all forms that have numerous command buttons on them to open forms and reports in the database. The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.