FollowHyperlink and form positioning

C

Carl Rapson

I'm using FollowHyperlink to open another MDE from my application. When the
second MDE opens, its startup form is not centered -- it is positioned in
the upper left area of the Access window. All subsequent forms position
correctly. If I run the MDE directly, the startup form is centered
correctly. Has anyone else encountered this before? Any suggestions as to
how I can center the form? Or is there an alternative to FollowHyperlink
that I can use to open a second MDE?

Thanks for any information,

Carl Rapson
 
S

Simon Maystre

If it is possible for you to make changes to the mde then you could add a
function like the one below:


Public Function MMForm(FormName, Optional RequiredView, Optional
FilterNameTxt, Optional WhereConditionTxt, Optional DataOpenMode, Optional
WindowOpenMode, Optional OpenArguments)

If IsMissing(RequiredView) Then RequiredView = acNormal
If IsMissing(FilterNameTxt) Then FilterNameTxt = Null
If IsMissing(WhereConditionTxt) Then WhereConditionTxt = Null
If IsMissing(WindowOpenMode) Then WindowOpenMode = acWindowNormal
If IsMissing(OpenArguments) Then OpenArguments = Null


If IsMissing(DataOpenMode) Then
DoCmd.OpenForm FormName, RequiredView, FilterNameTxt,
WhereConditionTxt, , WindowOpenMode, OpenArguments
Else
DoCmd.OpenForm FormName, RequiredView, FilterNameTxt,
WhereConditionTxt, DataOpenMode, WindowOpenMode, OpenArguments
End If

End Function

If you then create a reference to the external MDE from your main program,
then just use the function above to load any of the forms from the other MDE
as you would a normal form and they will load centrally in the same
application window without the need to start a new instance of Access

Hope this helps


Simon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top