473,587 Members | 2,527 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

in the printing of the access form get error dialog box

3 New Member
in the printing of the access form using following cord.. get error........

Expand|Select|Wrap|Line Numbers
  1. Private Sub CommandBtn_Click()
  2. Dim MyForm As Form
  3. Set MyForm = Screen.ActiveForm
  4. DoCmd.SelectObject acForm, MyForm.Name, True
  5. DoCmd.PrintOut
  6. DoCmd.SelectObject acForm, MyForm.Name, False 
  7. End Sub

the error is...
''the object you referenced in the visual basic procedure as an OLE object isn't an OLE object''

error number- 2950

please give me the solutions.....
Apr 25 '14 #1
1 1435
zmbd
5,501 Recognized Expert Moderator Expert
- Version of access?
- See here: > Before Posting (VBA or SQL) Code set the options and debug/compile (repeating after each fix)
- Insert STOP in-between lines 2 and 3 as formatted in the post.
- Run your code
- When you enter break mode at the STOP, use [F8] to step thru the code.
- When you reach the error line: Please post, the numbr of line the error occures and the EXACT title, number, and text of the error message. Please do not alter, omit, nor abbreviate the information provided in the error message
Apr 25 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1011
by: pargat singh | last post by:
Hi Everyone: I am posting this third time, Plaese Help.It is very urgent. I am having a problem to open asp.Net project.The error which i am getting is Web Access Failed the default Web access mode for this project is set to file share, but the
2
11682
by: Josh Strickland | last post by:
I am attempting to create an Access database which uses forms to enter data. The issue I am having is returning the query results from the Stored Procedure back in to the Access Form. tCetecM1CUST (SQL Table that contains the Customer Information) tAccountingDetail (SQL Table that contains the information in the form) frmAccountingEntry...
1
1684
by: Fred F. | last post by:
Here is my problem. From an ACCESS form, I run a C++ process reaching the same database in read/write mode via the ODBC driver. An error occurs: " The database has been placed by an unknown user in a state preventing it from being opened either locked. SQLSetConnectAttr failure of the pilot " (Nota : translated approximatively from the french...
5
1857
by: Hank | last post by:
I automatically shut down every PC that is logged into my Access 2000 database at a time that is set on a configuration screen (Around 02:00 AM) . I do this by checking Now() against the ShutDown time about once per minute in the main menu. This works fine unless an error dialog box comes up and no one closed it. The Command DoCmd.Quit...
14
3757
by: Simon Abolnar | last post by:
I would like to know how to open child form from dialog form. Thanks for help! Simon
4
1746
by: stax | last post by:
Hi, lately a lot users of my application complain it won't even startup, there seems to be a few problems. Here is a screenshot a user made of a error dialog I've never seen before: http://server2.ihostphotos.com/show.php?id=61788 Here is my source code:
1
1842
by: Lennart | last post by:
Hi all, Maybe someone can help me with this: My C++ project contains try and catch blocks. A catch-all block triggers my custom message box with some information on the error caught. The stacktrace is written to a log file. While stepping through my application from within the IDE everything works fine. However, when i start my...
1
2104
by: Zaher Rabah | last post by:
How can I display a form in dialog mode by press any keys in the keybaord in access 2003. This form is used as calculater "For fast calculate" This is the idea.
1
10480
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am trying to export to Excel using a command in an Access Form. RowID strFY AccountID CostElementWBS 1 2008 1 ...
4
2712
by: SandeepJagdeva | last post by:
I have a MS ACCESS Form that was designed for printing a Departmental Store’s bills. In this form I have a 6 column list box and some labels. The user adds items to this list box as per customer’s purchasing and then prints out this bill in 6x6 size paper. Command I use for printing is:- stDocName = "Print_Bill" Set MyForm =...
0
7920
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8347
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7973
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5718
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5394
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3844
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1454
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1189
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.