Solved

Common Dialog ocx

Posted on 1998-06-03
5
375 Views
Last Modified: 2008-03-04
ACCESS: 97
CommonDialog control: version 5.0
I want to retrieve some file names trough a standard Windows Open File Dialog.
Using the CommonDialog OCX I just got the filename without the complete path.
Why this is happening once I can get the entire path using the same OCX in Visual Basic?
How can I retrieve a file name whit the entire path from an ACCESS form?
0
Comment
Question by:ssa060398
  • 2
  • 2
5 Comments
 
LVL 8

Expert Comment

by:Helicopter
Comment Utility
I know it's no help, but mine is working as it should from within Access. Could you give any more details?
0
 

Author Comment

by:ssa060398
Comment Utility
OK! I need to fill a field with a complete file name. Now, I'm using a command button that calls the Open dialog box setting the OCX's action property to 1, as I do in VB. But after choose the file, CommonDialog.FileName contains only the file name (file.txt)and not the complete path (c:\temp\file.txt) as happens in VB.

0
 
LVL 1

Accepted Solution

by:
CEBAKA earned 50 total points
Comment Utility
I think that you use a wrong statement

You should use :

Make sure that you do

dummy=commondialogobject.ShowOpen
and then :
strfilename=commondialogobject.filename and then you get the path.This should work.
But when this is not happening something is wrong with the ocx.

Question
Do you use the 32 bit version ocx ?


0
 

Author Comment

by:ssa060398
Comment Utility
Did make no difference use ShowOpen instead Action.
But when I was checking the OCX version (and now I'm sure that it's 32bit OCX!!) I've noted that a 16 bit OpenDialog was been opening.
Sounds a little bit weird???? But that's the fact: When you use the &H1000 (File must exist) the 32bit OCX shows a 16bit Open Dialog window and retrieves jus the file name without the complete path.
Your answer didn't solve my question directly, but by your clue, you got your points!!

Thanx!!
0
 
LVL 1

Expert Comment

by:CEBAKA
Comment Utility
Thank you for your grade !!

I had the same problem as you did couple months ago
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of utilizing SQL Server views 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 Access…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 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

8 Experts available now in Live!

Get 1:1 Help Now