Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dev? Douglas? Tony? MVP? - A quick clarification please...

1 view
Skip to first unread message

Carroll Lastinger

unread,
Sep 12, 2000, 11:23:57 PM9/12/00
to
From "The Access Web" site I'm trying to use the "relink access tables from
code" example and it references the GetOpenFileName function. I notice a
lot of redundancy in the second but am not knowledgeable enough to whittle
down all the (strange to me) code within GetOpenFileName to keep it form
"compile" erroring.

I pasted the "relink access tables from code" example in my A97 app but when
I compiled without any of the GetOpenFileName code I got a "sub or function
not defined" error on ahtAddFilterItem of the fGetMDBName function.

I then pasted ALL of the GetOpenFileName code and got strange error messages
like "can't have anything after a function ends except comments" or
something like that (and yes I did paste it EXACTLY as in the example). I
then removed all of that GetOpenFileName code.

Would you please point out the most MINIMUM portion of the GetOpenFileName
code needed to pair with the "relink access tables from code" example.

A quick clarification would be Grand! ALL of you guys are tops!
Thanks for this and ALL of the other help you guys provide. I really
appreciate it.

Carroll.


Douglas J. Steele

unread,
Sep 13, 2000, 6:43:02 AM9/13/00
to
Realistically, the only thing in the example that you don't need is the
function TestIt, but given how small that is, you may as well leave it.

You need everything that's in gray in the example: start after the code
start line, and take everything up to the code end line. The last line
you're pasting in should be an End Function.

HTH

--

Doug Steele, Microsoft Access MVP
Beer, Wine and Database Programming. What could be better?
Visit "Doug Steele's Beer and Programming Emporium"
http://I.Am/DougSteele/


Carroll Lastinger <carroll-...@atl.mediaone.net> wrote in message
news:hrCv5.2723$Lh2.9...@typhoon.southeast.rr.com...

Carroll Lastinger

unread,
Sep 13, 2000, 7:51:28 AM9/13/00
to
Thanks Douglas, but...

But I get a compile error on the following line:

[pasted as one single long line]
Declare Function aht_apiGetOpenFileName Lib "comdlg32.dll" Alias
"GetOpenFileNameA" (OFN As tagOPENFILENAME) As Boolean

that says: Compile Error:
"Only comments may appear after End Sub, End Function, or End Property.

...which is the first line after the first "End Type"

Why is that?


"Douglas J. Steele" <djst...@idirect.com> wrote in message
news:eXwx72WHAHA.196@cppssbbsa05...

Carroll Lastinger

unread,
Sep 13, 2000, 8:56:07 AM9/13/00
to
I did a re-paste because I found stray "end function" calls within strange
places from the first paste. Thanks Douglas.
All fixed now - Thank you Douglas.

"Carroll Lastinger" <carroll-...@atl.mediaone.net> wrote in message

news:4TJv5.2804$IV1.8...@typhoon.southeast.rr.com...

0 new messages