reusing form and display different buttons

D

deb

I am reusing a form called fClosure and need to open the form from 2
seperate forms and display different buttons(according to where fClosure is
opened).

On FSplash form I have a button called btnAppClosureMgr I want this to open
the fClosure form and display the button called List001 on the fClosure form.

On f001ProjectReview form I have a button called btnProjClosePM I want this
to open the fClosure form and display the button called List002 on the
fClosure form.

It's driving me crazy.
 
S

S.Clark

I assume you use Docmd.Openform to open fClosure. One of the parameters of
OpenForm is called OpenArgs. In it, you could pass the name of the calling
form, and then react to it in the OnOpen of fClosure.

If me.openargs = "FSplash" then
...
Else
...
End If
 
D

deb

Here is the code in fSplash , how do i do the open args?

Private Sub btnAppClosureMgr_Click()
On Error GoTo Err_btnAppClosureMgr_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "fClosure"
DoCmd.OpenForm stDocName, , , stLinkCriteria
 
J

Jeff Boyce

Deb

While it is possible (see elsethread), I'm wondering why?

You've described "how" you are trying to accomplish something, but not much
about "what".

If you care to post a description of the business need/issue you are trying
this approach to solve, folks here may be able to offer alternate
approaches...

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 

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