Talk About Network

Google





Software > Access Forms > Re: Open specif...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 5 Topic 44621 of 46786
Post > Topic >>

Re: Open specific form from cmd button

by =?Utf-8?B?Unlhbg==?= <Ryan@[EMAIL PROTECTED] > Aug 19, 2008 at 02:49 PM

You would place the code in the on click event of the command button.  Have

you gotten this to work?
-- 
Please remember to mark this post as answered if this solves your problem.


"Steve" wrote:

> I'm missing something - if the values in the field that controls what
form 
> should open are A,B,C,D and E for example - would I name the forms
A,B,C,D 
> and E so they match per your example?
> 
> Also, I'm not sure where I would place this code - could you please 
> elaborate?
> 
> THX!
> "Ryan" <Ryan@[EMAIL PROTECTED]
> wrote in message 
> news:349195B2-95A4-4D60-BEFD-191850A336B4@[EMAIL PROTECTED]
> > This should work for you
> >
> > Private Sub YourCommandButtonName_Click()
> > Dim FormToOpen as String
> > FormToOpen = Me.TheNameOfTheField
> >
> > DoCmd.OpenForm "FormToOpen"
> > DoCmd.Close acForm, "ThisFormsName"   (Optional)
> > End Sub
> >
> > To Return you would have a button on the other form and you could hard

> > code
> > the name of the form you came from into that code.
> >
> > Private Sub YourCommandButtonName_Click()
> >
> > DoCmd.OpenForm "YourOriginalFormName"
> > DoCmd.Close acForm, "ThisFormsName"   (Optional)
> > End Sub
> > -- 
> > Please remember to mark this post as answered if this solves your
problem.
> >
> >
> > "Steve" wrote:
> >
> >> I want to add a command button to an existing form to allow entry of
> >> additional data for another table or tables via form. Can I control
what
> >> form is opened when they press the command button based on the value
of a
> >> field in the already open form? Do I need to do anything special
after
> >> opening the second form via command button to return bo the original 
> >> form?
> >>
> >> Thx!
> >>
> >>
> >> 
> 
> 
>
 




 5 Posts in Topic:
Open specific form from cmd button
"Steve" <shi  2008-08-05 21:32:49 
RE: Open specific form from cmd button
=?Utf-8?B?Unlhbg==?= <  2008-08-05 15:14:01 
Re: Open specific form from cmd button
"Steve" <shi  2008-08-05 23:01:58 
Re: Open specific form from cmd button
=?Utf-8?B?Unlhbg==?= <  2008-08-05 19:46:01 
Re: Open specific form from cmd button
=?Utf-8?B?Unlhbg==?= <  2008-08-19 14:49:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Fri Jan 9 14:13:22 PST 2009.