Solved

Opening a access mdb with vba

Posted on 2004-04-21
3
1,543 Views
Last Modified: 2010-05-18
Hi all,

I'm trying to call another access mdb on a commandbutton_click()
Synatx as follows:

stAppName = "C:\Project\Inventory.mdb"
Call Shell(stAppName, 1)

This throws me an error "Invalid procedure call or argument".
If I were to change to this,

stAppName = "Access.exe C:\Project\Inventory.mdb"

It tells me file not found. Suggestions please?

Xhenkaii
0
Comment
Question by:xhenkaii
3 Comments
 
LVL 6

Accepted Solution

by:
nathaniel earned 50 total points
ID: 10884848
try this one,

sub openthefile
   dim stAppName
   stAppName = Shell("msaccess.exe C:\Project\Inventory.mdb",1)
end sub

in calling the procedure:
type: call openthefile

hope this helps,
0
 
LVL 34

Expert Comment

by:flavo
ID: 10884871
Shell ("C:\Program Files\Microsoft Office\Office\Msaccess.exe C:\Project\Inventory.mdb",1)
0
 

Author Comment

by:xhenkaii
ID: 10885073
Thanks guys.

I'll accept nlhizon ans as he was first and it works.

Xhenkaii
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now