Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual FoxPro
Expertise: Beginner
May 31, 2000

VFP Form Management

Question:
How do I call a form from another form using a command button?

Answer:
You can put code into the Click event of the command button that executes a DO FORM command that will bring up the form you want. For example:

  1. Create a form called ParentForm by executing the following command in the Command Window:
    MODIFY FORM ParentForm

  2. Add a command button to this form and put the following code into the Click event of the command button:
    DO FORM ChildForm

  3. Set the caption of the form to "Parent."
  4. Save the form.
  5. Create a form called ChildForm by executing the following command in the Command Window:
    MODIFY FORM ChildForm

  6. Set the caption of the form to "Child."
  7. Save the form.
  8. Execute the following command from the Command Window:
    DO FORM ParentForm

  9. Click on the command button. You should see the Child form come up.
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap