473,398 Members | 2,812 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,398 software developers and data experts.

How to make a newly opened DB (opened via VBA) visible

I have worked through the open syntax to open a database from VBA, but the database does not appear to actually open. Here is the code:

Dim MyConn As ADODB.Connection
Dim MyRecordSet As ADODB.Recordset

Set MyConn = New ADODB.Connection
MyConn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=c:\Tools\Test_DB.accdb;Persist Security Info=False;"

MyConn.Open

I have opened up the Windows Task Manager to watch and see if another instance of Access opens when this code executes, but it does not appear to.

How do I make the newly opened DB actually open and be visible? Inother words, I want the new DB to open and go to the default form as if I double-clicked on the Access icon. Thx
May 26 '10 #1

✓ answered by vb5prgrmr

You cannot make it visible with the methods you are using because you are actually using the DAO/Jet engine to access the file and the data it contains, just like access does. To spawn access, use the shell function if it is available in VBA, else shellexecute API if you can use such in VBA...



Good Luck

2 1440
vb5prgrmr
305 Expert 100+
You cannot make it visible with the methods you are using because you are actually using the DAO/Jet engine to access the file and the data it contains, just like access does. To spawn access, use the shell function if it is available in VBA, else shellexecute API if you can use such in VBA...



Good Luck
May 27 '10 #2
Thank you for your answer. Using the methods I am using can I access the tables and forms in the external copy of Access? Thx
May 27 '10 #3

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

Similar topics

2
by: cannen | last post by:
I am wanting to use Docmd to open another form and set the newly opened forms detail.visible = false to true. stDocName = "frmVacRequest" DoCmd.OpenForm stDocName, acNormal 'This opens my form...
3
by: Trint Smith | last post by:
I have several strings in my project that I want all programs in the project to be able to see...How do I do that? Thanks, Trint .Net programmer trintsmith@hotmail.com *** Sent via...
0
by: bird lazy | last post by:
Hi all, One more stupid question. I developed a class library -- how can I use it in MSA? It can't ref it. Is it possible at all??? Thanks. --
5
by: shapper | last post by:
Hello, Is there a way to make the browser scroll bar, the one on the right which makes page go down and up, always visible? Thanks, Miguel
4
by: Miki | last post by:
Hello, I have a simple Tkinter window with and buttons at the bottom. When I resize the window to be shorter, the first thing to disappear are the buttons, however I want these button to be...
2
by: CyberSoftHari | last post by:
I want to show a reminder message in my application and which should always visible, even user click some other application. (i.e.) other application window should not hide my message window. Any...
2
by: Trebormac | last post by:
I have a make table query that I want to run from VBA. What is the syntax to add or change the table name? Thanks for any help!
6
by: Ciaran | last post by:
I'm having a really strange issue with the DataGridView control in a VS2008 / .NET 3.5 winforms project. I have a simple form with a grid. In the form constructor I call a function to bind the grind...
4
by: sam15024 | last post by:
Hi I am newbie, can you please help me to create this query through vba SELECT .Field1, .Field2, .Field3, .Field4, .Field5 FROM 010710_pri GROUP BY .Field1, .Field2, .Field3, .Field4, .Field5...
5
by: tetsuo2030 | last post by:
Hey All, I’ve reached another aesthetic stumbling block: I have a report that lists all the widgets on Optimus Prime with the fields "Widget Number" and "ID Number" (and some other fields). ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.