I use this function in several places in a particular app that I'm writing; in one place, it works just fine; in another, it returns error code 301, meaning "Failure". The parameters I'm plugging into the passed data structure are:
You are using a function that probably comes form a CD that came with a book. I believe adh_..etc stands for Access Developers Handbook. You need to use your debug feature to scroll through your code and see where it stalls. Otherwise, give us the adh_function code so people on this site can assess where and why the error occurs.
I presume it is an api in msaccess.exe. It's function is to display and handle an open file dialog popup. I call it in reponse to a form's Browse button click. The other call I mentioned is called from another such button on a different form in the same app; the only difference is that it has a flag set that indicates the form is for directory, not file, determination.