Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Common Dialog ocx

Posted on 1998-06-03
5
Medium Priority
?
417 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
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 150 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
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…
Suggested Courses

971 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