UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Microsoft Documentation Less Than Helpful    
 
   
jabm
post May 22 2020, 05:15 PM
Post#1



Posts: 49
Joined: 29-January 20
From: Londonderry, NH. USA


To make a long story short I've been looking up ways to code an Access text box for file path accessibility (store full file path, open file on double click)
Anyway I am looking at their documentation on the MsoFileDialogType which makes some sense (doesn't fully explain the differences/uses of the 4 types - https://docs.microsoft.com/en-us/office/vba...filedialogtype )://https://docs.microsoft.com/en-us/of...iledialogtype )
and I scroll down the left-sided menu and see MsoPathFormat (https://docs.microsoft.com/en-us/office/vba/api/office.msopathformat) -- all the explanation say is this is for path type 1, path type 2, etc. What exactly are these different path types? I know I don't really *need* to know this for what I am trying but now that I've stumbled upon it I am more puzzled than not. For the most part, the docs.microsoft.com are sorely lacking in explanations and it is frustrating to beginners

Thank you
This post has been edited by jabm: May 22 2020, 05:41 PM
Go to the top of the page
 
FrankRuperto
post May 22 2020, 05:27 PM
Post#2



Posts: 979
Joined: 21-September 14
From: Tampa, Florida USA


The link you provided does not exist. Try this one: https://docs.microsoft.com/en-us/office/vba...ofiledialogtype

QUOTE (jabm)
...ways to code an Access text box for file path accessibility (store full file path, open file on double click)


Put a control next to the file path text box. Clicking the control can then open the file.


--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix, Oracle & PostgreSQL db's.
Go to the top of the page
 
jabm
post May 22 2020, 05:42 PM
Post#3



Posts: 49
Joined: 29-January 20
From: Londonderry, NH. USA


It was just that the ending ')' for my sentence fragment was being picked up as part of the URL - fixed
And yes I will most likely adding a button -
But this still doesn't answer the question of what exactly is path "Type1", "Type2", etc.

Go to the top of the page
 
theDBguy
post May 22 2020, 05:44 PM
Post#4


UA Moderator
Posts: 78,120
Joined: 19-June 07
From: SunnySandyEggo


Hi. If you're looking for a way to open the file browser to select a file and store its path, then check out the FileDialog object, which uses the FileDialogType. You would want to use msoFileDialogFilePicker.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
jabm
post May 22 2020, 05:57 PM
Post#5



Posts: 49
Joined: 29-January 20
From: Londonderry, NH. USA


Thanks - am looking at that documentation -- and trying to understand the different MsoFileDialogTypes which are used by the FileDialog object.
There are 2 parts of what I am trying to do (which I'll most likely be posting questions on later in the Forms Forum)
1) To be able to fill the text box initially with the document file path (just let it be a straight let them type it or code either in the textbox control itself or from a button along side).
2) Once the textbox control has the data of the document file path how to have the user open the file.

I still trying to learn and understand the overall surroundings/Microsoft Access - which is the purpose of this specific topic thread - what is meant by the different file path formats
All this says ( https://docs.microsoft.com/en-us/office/vba...e.msopathformat ) is that
msoPathType1 has a value of 1 and represents the Type1 format
msoPathType2 has a value of 2 and represents the Type2 format
etc.

-- but what *exactly* is the Type1 format and how does it differ from the Type2 format, or the Type3 format?

I know I don't need to know this for my project, but now that I've seen it, I would like to understand for the sake of understanding...
This post has been edited by jabm: May 22 2020, 05:58 PM
Go to the top of the page
 
FrankRuperto
post May 22 2020, 06:41 PM
Post#6



Posts: 979
Joined: 21-September 14
From: Tampa, Florida USA


Hi jabm,

I thought your objective was to open the file whose absolute path is stored in the text field?... If it's the file browser you want for picking any file, then use what DBGuy suggested.

You don't need to be concerned with the enumerations of msoPathFormat.

There are two types of paths, absolute and relative: https://docs.microsoft.com/en-us/dotnet/sta...le-path-formats

All you have to do is create the appropiate DialogObject, like in the example DBGuy provided for the picker.

CODE
Set fd = Application.FileDialog(msoFileDialogFilePicker)

This post has been edited by FrankRuperto: May 22 2020, 07:15 PM

--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix, Oracle & PostgreSQL db's.
Go to the top of the page
 
jabm
post May 22 2020, 06:48 PM
Post#7



Posts: 49
Joined: 29-January 20
From: Londonderry, NH. USA


Not on this particular thread -- re-read the initial post - I am just trying to understand - in this particular thread - is: what is meant by Type1, Type2, Type3, etc that the msoPathType1, msoPathType2, msoPathType3, etc represent.
The part of the initial thread relating to the opening of a file was just to explain how I got to the MS Documentation in question.

Thank you
Go to the top of the page
 
FrankRuperto
post May 22 2020, 07:15 PM
Post#8



Posts: 979
Joined: 21-September 14
From: Tampa, Florida USA


See my edited post #6

--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix, Oracle & PostgreSQL db's.
Go to the top of the page
 
jabm
post May 22 2020, 07:49 PM
Post#9



Posts: 49
Joined: 29-January 20
From: Londonderry, NH. USA


Yes it is true I don't need to concern with them, but the knowledge for the sake of knowledge is good too.

The point is that the official MS Documentation is less than helpful and since they have bothered to have msoPathType1, msoPathType2 and have at least the page for the non-documentation, then there should be information as to what the Type1, Type2, Type3, etc. actually are.

That is all I am looking for here to know what the Type1 that the msoPathType1 represents is.

Their documentation saying that it represents Type#, without even a link explaining what the Type# are makes the page pointless.

I'm not trying to be argumentative, just want to know for the sake of knowing and understanding.

Go to the top of the page
 
FrankRuperto
post May 22 2020, 09:02 PM
Post#10



Posts: 979
Joined: 21-September 14
From: Tampa, Florida USA


Agreed, the docs don't really explain in more detail what they mean. My common sense guesses each type refers to the different subtypes of absolute and relative paths. These enums are real low-level stuff used in Office Win32 TypeLib's for mso.dll

They're constants included in the mso_enum.h header file used in Microsoft's cpp source code. I wouldn't bother trying to figure it out or store it in your brain. There's plenty of other Access/VBA idiosyncrasy to learn and remmeber lol.

--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix, Oracle & PostgreSQL db's.
Go to the top of the page
 
jabm
post May 22 2020, 09:07 PM
Post#11



Posts: 49
Joined: 29-January 20
From: Londonderry, NH. USA


Thanks!


Go to the top of the page
 
tina t
post May 23 2020, 01:24 AM
Post#12



Posts: 6,601
Joined: 11-November 10
From: SoCal, USA


hello Julia, take a look at this Help link, which page also contains this link. those may help a little bit.

also, i worked with Application.FileDialog some last year, when i was rewriting code in one of my dbs (converting from A97 to A2016, fun times). i did some testing, and made some notes. hmm, they may be kinda lame, but i'll try to remember to post them when i go back to work after the holiday. i just hope folks here will be kind and not laugh too hard! ;)

hth
tina

--------------------
"the wheel never stops turning"
Go to the top of the page
 
jabm
post May 23 2020, 08:44 AM
Post#13



Posts: 49
Joined: 29-January 20
From: Londonderry, NH. USA


Thank you Tina!
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    29th May 2020 - 07:02 PM