Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to open specified AutoCAD drawing from Access

Status
Not open for further replies.

swall

Technical User
Oct 25, 2000
2
US
My drawing log is in an Access database. I need a macro or method to open the current AutoCAD drawing number shown on the Access form. Opening AutoCAD from Access is easy but I want to open a specified drawing similar to double clicking on a file in the windows file manager.
 
Sorry I can't help you, but maybe you can help me. I am trying to figure out how to open Autocad from ACCESS. What are you doing?
 
To run an application like AutoCAD From Access, I created a command button with the wizard. Choose "Application" under Categories and "Run Application" under the Action Category. Then browse to find the path to your acad.exe file. My problem was getting AutoCAD to open the drawing specified in my Access form as well. Thanks.
 
You can link documents such as Word processor files. Spread Sheets, CAD drawings (etc.) easily. This method requires NO coding and allows users to open related documents dirrectly from an access form.

1) In your forms underlying table create a create a field with data type OLE object (Ill call it OLEfield).

2) On your form create an unbound OLE frame (Ill call it OLEfrm) with the following properties:


Control Source: OLEfield

Display Type: Icon or Content (Content will display the document contents only if you have the appropriate viewers installed)

OLE Type Allowed: Linked

Enabled: Yes

Locked: No

Auto Activate: Double-Click

3) Create a Command Button with the following the following macro in its on click event.

Action Arguments
-----------------------


GoToControl OLEfrm
RunCommand InsertObject

When the user wants to link a file they simply click the button. An insert object dialog will appear prompting them to select a file. Once the file is selected the path and file name will be stored in the table. The user can open the associated application and the linked file then by simply doubleclicking on the OLE frame in the form at any time.

This technique is useful for document control databases or information management databases.

Dave
gallagherd@earthlink.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top