PC Review


Reply
Thread Tools Rate Thread

Alternative forms

 
 
=?Utf-8?B?UGhpbA==?=
Guest
Posts: n/a
 
      30th Aug 2006
It may be easier if I describe what I'm trying to do!
I need to create a mechanism, whereby I can ask the user if he wants option
A or option B. If he/she selects A, then the user is presented with Form A.
If he selects B, then he is presented with Form B.
Would anybody know how to do this?

Many thanks in advance

Phil

 
Reply With Quote
 
 
 
 
KML
Guest
Posts: n/a
 
      30th Aug 2006

1) Create a new form called "frmMain" (or whatever you want to call it)
and go into Design view.
2) Use the toolbar to create two command buttons. Cancel the wizard if
it pops up. Right click on each command button and go to Properties.
Change the names to "cmdOpenFormA" and "cmdOpenFormB". Change the
captions to "Open Form A" and "Open Form B" respectively.
3) Go to the View>Code. The Microsoft Visual Basic Editor should open.
4) Paste the following code in the main code window under "Option
Compare Database"

Private Sub cmdOpenFormA_Click()

DoCmd.OpenForm "Form A"

End Sub


Private Sub cmdOpenFormB_Click()

DoCmd.OpenForm "Form B"

End Sub

5) Save the code. Close the Microsoft Visual Basic Editor.
6) Run the form and test the buttons. They should open your forms.

Phil wrote:
> It may be easier if I describe what I'm trying to do!
> I need to create a mechanism, whereby I can ask the user if he wants option
> A or option B. If he/she selects A, then the user is presented with Form A.
> If he selects B, then he is presented with Form B.
> Would anybody know how to do this?
>
> Many thanks in advance
>
> Phil


 
Reply With Quote
 
=?Utf-8?B?UGhpbA==?=
Guest
Posts: n/a
 
      30th Aug 2006
Many thanks!

"KML" wrote:

>
> 1) Create a new form called "frmMain" (or whatever you want to call it)
> and go into Design view.
> 2) Use the toolbar to create two command buttons. Cancel the wizard if
> it pops up. Right click on each command button and go to Properties.
> Change the names to "cmdOpenFormA" and "cmdOpenFormB". Change the
> captions to "Open Form A" and "Open Form B" respectively.
> 3) Go to the View>Code. The Microsoft Visual Basic Editor should open.
> 4) Paste the following code in the main code window under "Option
> Compare Database"
>
> Private Sub cmdOpenFormA_Click()
>
> DoCmd.OpenForm "Form A"
>
> End Sub
>
>
> Private Sub cmdOpenFormB_Click()
>
> DoCmd.OpenForm "Form B"
>
> End Sub
>
> 5) Save the code. Close the Microsoft Visual Basic Editor.
> 6) Run the form and test the buttons. They should open your forms.
>
> Phil wrote:
> > It may be easier if I describe what I'm trying to do!
> > I need to create a mechanism, whereby I can ask the user if he wants option
> > A or option B. If he/she selects A, then the user is presented with Form A.
> > If he selects B, then he is presented with Form B.
> > Would anybody know how to do this?
> >
> > Many thanks in advance
> >
> > Phil

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Google Adsense Alternative - Commission Junction Alternative -ClickBank Alternative William9999 Windows XP Performance 0 2nd Nov 2010 09:02 AM
Google Adsense Alternative - Commission Junction Alternative -ClickBank Alternative William9999 Windows XP Performance 0 2nd Nov 2010 09:01 AM
Alternative to Outlook forms? Eve Microsoft Outlook Form Programming 1 23rd Nov 2004 11:33 PM
Alternative to Windows.Forms Tommy Carlier Microsoft Dot NET Framework 4 17th Nov 2004 09:45 AM
Alternative to Windows.Forms Tommy Carlier Microsoft Dot NET Framework Forms 4 17th Nov 2004 09:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:11 AM.