If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

why is this happen?

[Originally posted by maria]

hello there :)

my problem is i want to pass value (which is user Name) from text1.text in Form1 to text1.text in Form2.

well, i can do this only for the first user.

When a first user, for an example Adam put his name in text1 in form1,his name will appear in text1 in form2. i'm success in this. But, my problem is, when the second user (Eva) put her name in text1 form1, her name did not appear in text1 form2 because Adam's name still appear in the text1 form2.

Why this is happen? why the text1 form2 did not show Eva's name?
Could anybody tell me why?
i'm using MSAccess 97 as my database

Re:why is this happen?

You show a Form_Activate event and a Form_Load event in your code sample. I'm assuming the Form_Activate is Form1 and the Form_Load is from Form2.

If you are populating the Form2.Text1.Text in the Form_Load event of Form2 it will only populate the TextBox when the Form loads.

You show this code:

me.hide
load Form2
Form2.Show

That loads Form2. This populates the Text1.Text with "Adam" the first time. If you don't ever Unload Form2 then you can't load it again to populate the Text1 TextBox on Form2.

Instead of having it in the Form_Load event you could do this.

Someplace in Form1 you would have this code.

Form2.Text1.Text = Text1.Text
Form2.Show

You don't need to load Form2 because when you access any control of Form2 the Form_Load event will automatically fire first. I'm not sure why you are hiding Form1 but you could show Form2 as Modal to keep people from accessing Form1 while Form 2 is visible. Like this: