Solved

Common Dialog ocx

Posted on 1998-06-03
5
398 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

738 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