How to call file dialog box in access form application
I am using access 2000 to write an form application.
I need to open a file dialog box to select a file and extract the file path.
The solution should be compatible to all version of access from 97 and above, and it sho开发者_运维知识库uld not require any extra module to be pre-installed in the user's computer. No third party library, only native call to windows api.
P.S. I need detail steps which shows me where to add the code.
For these kind of Access FAQs, you should always try the Access Web as a starting point for searching (though the search interface sucks -- it's easier to search the site with Google). That site is the official FAQ site for a number of the non-MS Access newsgroups. It doesn't get updated often, but the code is still quite useful, precisely because it answers questions that are asked frequently.
The code you need is in one of the API modules, helpfully titled Call the standard Windows File Open/Save dialog box
That should be "...to write a form application."
There is an unsupported declare not into the Windows API but into msaccess.exe itself. It was first publicized, I believe, in the AccessDeveloper's Handbook. I'm not on my development machine at the moment but I can look it up when I get there. Or, you can probably find it yourself without too much trouble.
精彩评论