Solved

Common Dialog ocx

Posted on 1998-06-03
5
406 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 8

Expert Comment

by:Helicopter
ID: 1974821
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
ID: 1974822
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
ID: 1974823
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
ID: 1974824
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
ID: 1974825
Thank you for your grade !!

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

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

615 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