473,748 Members | 2,398 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open other access database from button inside access database

57 New Member
Hi,

I've created an access 2003 database that has a form with button called "open complaint database." This complaint database is also in access 2003. Here is my code to open the complaint database

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdOpenDb_Click()
  2.        Dim objAccess As Access.Application
  3.  
  4.          ' Open Access database
  5.          Set objAccess = CreateObject("Access.Application")
  6.          With objAccess
  7.             ' Make the application visible.
  8.             .Visible = True
  9.             ' Open the complaint database.
  10.             .OpenCurrentDatabase ("C:\complaint_2003.mdb"), False
  11.             Set objAccess = Nothing
  12.      End With
  13.      Exit Sub
  14. End Sub
when I click the button, I get this error "Microsoft office access has encountered a problem and need to be close. We are sorry for the incovenience" with send error report and don't send buttons.

I tested this code using access 97 to open another access 97 and it worked perfectly. Can anyone please help me on how to open access 2003 database from another access 2003, because I need to convert all my access 97 databases to access 2003?

Thank you in advance.
Oct 4 '07 #1
3 3779
Scott Price
1,384 Recognized Expert Top Contributor
Hi, I'm using Access 2003 also, and copying and pasting your code (with the one change of making the path point to a valid database on my computer) works just fine!

Check your references to make sure all are where they should be:

I've got these six selected:

Visual Basic for Applications
Microsoft Access 11.0 Object Library
OLE Automation
Microsoft DAO 3.6 Object Library
Microsoft ActiveX Data Objects 2.1 Library
Microsoft Office 12.0 Object Library

Other than that, I would say you've got a possibly corrupted database, or a possibly corrupted install of Access.

This is a link to Allen Browne's website with suggestions on Recovering Corruption , and Preventing Corruption .

Regards,
Scott
Oct 4 '07 #2
ConfusedMay
57 New Member
Hi, I'm using Access 2003 also, and copying and pasting your code (with the one change of making the path point to a valid database on my computer) works just fine!

Check your references to make sure all are where they should be:

I've got these six selected:

Visual Basic for Applications
Microsoft Access 11.0 Object Library
OLE Automation
Microsoft DAO 3.6 Object Library
Microsoft ActiveX Data Objects 2.1 Library
Microsoft Office 12.0 Object Library

Other than that, I would say you've got a possibly corrupted database, or a possibly corrupted install of Access.

This is a link to Allen Browne's website with suggestions on Recovering Corruption , and Preventing Corruption .

Regards,
Scott
Thank you for the reply and yes it was my access installation problem. Once I reinstalled office it's working fine.
Oct 5 '07 #3
Scott Price
1,384 Recognized Expert Top Contributor
Glad you got it working! Thanks for posting back with the solution.

Regards,
Scott
Oct 5 '07 #4

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

Similar topics

6
1613
by: Arsene Lupin | last post by:
Is there a way to have Microsoft Access XP automatically display all table views, etc., in a maximized screen when Access is started? It is extremely time consuming to have to maximize the viewing windows inside Access every single time I started it. Thanks in Advance.
2
4312
by: plau011 | last post by:
Hello Access gurus, I am curious as to why you can't open an Access 2003 Db with Access 2000. We have a Visual Basic application which is using DAO 3.6 to connect to the Access database. It IS able to open an 2000 and 2003 Db because they are all in Jet 4 database format, I assume. But when trying to open an Access 2003 Db from Access 2000 you get the 'Unrecognized database' Error. Aren't they the same database structure and the only...
1
1443
by: Neil | last post by:
Hi, I have a database that's been developed in Access 2000. On clicking the database icon, the datbase moves straight to a switchboard. For coding I press the shift button while starting the database. This works fine at my workplace where I'm using Office 2000. However, on trying to open the same database at home (where I have Office 2003) I first get some error about Jet drivers not being installed (I pretty much get these errors...
1
2032
by: simplengrichard | last post by:
Hi everyone! I need some help. I placed a webform table and then I added other controls within the cell such as dropdown box and buttons, etc. I was wondering if it is possible to access this controls from the code behind? Thanks. I appreciate any information you can give me. Thanks again.
2
4468
jaccess
by: jaccess | last post by:
I was wondering if there is a simple way to open a specific folder from an access form button. I have a form that a user can enter a date range and either view or print reports based on the date range. These reports are based on linked excel files. What I am trying to do provide a simple way (press a button) for my users to be able to open their excel files from the form instead of having to open excel, locate the folder then locate the...
0
2381
by: Tony | last post by:
I am continuing to develop an Access 2007 application which was originally converted from Access 2003. In Access 2003 I was able to disable the Access Close button in the top righthand corner of the screen. I have been unable to find any way to disable this button in Access 2007 and subsequently I have been forced to find ways to detect and handle the situations after the Access Close button has been clicked. I have been largely...
5
5893
by: Tony | last post by:
I am continuing to develop an Access 2007 application which was originally converted from Access 2003. In Access 2003 I was able to disable the Access Close button in the top righthand corner of the screen. I have been unable to find any way to disable this button in Access 2007 and subsequently I have been forced to find ways to detect and handle the situations after the Access Close button has been clicked. I have been largely...
1
8058
by: semomaniz | last post by:
I have a button inside a repeater which is supposed to open a popup when clicked. But when i click on the button my modalpopup does not open. The strange thing is on the code provided below if i replace the button with linkbutton every thing works fine and I have my popup dispalying. Is there a reason for the buttons to not function inside the repeater? <asp:Repeater ID="myrep" runat="server" OnItemCommand="myrep_ItemCommand">...
2
2024
Breeves22
by: Breeves22 | last post by:
Hi all I have no idea if this is possible and doing a general search on the internet yeilded no results so i thought i would ask here. In the database i am creating there will be a need to open up a folder stored on the computer to edit a file contained inside. This file is updated on a weekly basis and when this happens a new file is created so it is not practical to use a command that opens directly to the file. Is it possible to use a...
0
8991
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8830
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9372
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9247
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6796
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4606
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2783
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.