|
-
Feb 2nd, 2000, 12:45 PM
#1
Thread Starter
Member
I'm wanting one form to look at another form for varialbes and option buttons each time the form is viewed using the Form!AhemOptionDuh.Value command. It is opened by the FormBlah.Show and is removed from view by the FormBlah.hide, so I can not put commands into the FromBlah_Load sub.
How can I do this?
-
Feb 2nd, 2000, 03:10 PM
#2
Frenzied Member
First of all, just so you know, it's much easier to read if you just say Form1.Hide and Form2.Hide (rather than Form!AhemOptionDuh.Value)!!! 
You should be able to refer to values on another form simply by referencing the specific property of the specific control.
For an example, create a project with 2 forms (Form1 and Form2). Place a textbox on each form (Text1) and a command button on each form (Command1).
The command button will hide the form that contains it and show the other form. Form1 will load first. On Form1's Activate event, the text from the textbox on Form2 will be placed in the textbox on Form1 (while Form2 is hidden). You can use the command button to go to Form2, change the text, then when you go back to Form1, the text will have changed.
Here's the code for Form1:
Code:
Option Explicit
Private Sub Command1_Click()
Form2.Show
Me.Hide
End Sub
Private Sub Form_Activate()
Text1.Text = Form2.Text1.Text
End Sub
Here's the code for Form2:
Code:
Option Explicit
Private Sub Command1_Click()
Form1.Show
Me.Hide
End Sub
Hope that helped a little!!
~seaweed
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|