473,403 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

how to pass value from one form to another form

Im using VB 6.0

The problem is have two forms the the first one (name it Form1) include one textbox control and button , and when pressing button I want to pass the textbox value to another text control in the second form (name it Form2). Please help me. Thanks
Sep 5 '07 #1
4 21083
hariharanmca
1,977 1GB
Im using VB 6.0

The problem is have two forms the the first one (name it Form1) include one textbox control and button , and when pressing button I want to pass the textbox value to another text control in the second form (name it Form2). Please help me. Thanks

Expand|Select|Wrap|Line Numbers
  1. frmFromValueCallName.ctrlName.Text = Me.ctrlName.Text
I think this will help you
Sep 5 '07 #2
QVeen72
1,445 Expert 1GB
Hi,

It is :

Expand|Select|Wrap|Line Numbers
  1. Form2.Text1.Text = Me.Text1.Text
  2.  
REgards
Veena
Sep 5 '07 #3
sgrec7
59
i think this might be what your after:

Expand|Select|Wrap|Line Numbers
  1.  
  2. (form1)
  3.  
  4. private sub command1_click ()
    me.hide
    form2.show
    form2.textbox1.text = me.textbox1.text
    end sub
  5.  
  6. (form2)
  7.  
  8. private sub command1_click ()
    me.hide
    form1.show
    form1.textbox1.text = me.textbox1.text
    end sub
  9.  
  10.  
that should work for what your after (notice that that is two separate form's codes, not two separate sub's

that will; on the click, hide form1, show form 2, the text in form1 will = the text in form2, and visa versa

(you might need to change the names of some objects)

sgrec7
Sep 5 '07 #4
Thank you guys for the help....
Sep 6 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: vishal | last post by:
hi i am using get method to pass data from one form to another and my value may contain & symbol. so when this is case the value after & sign is truncated which is logically true. so what...
4
by: GavMc | last post by:
Hello I am new to internet programming and wonder if anyone can help me with this.... I am trying to pass a hidden field value on a form into another field on the form so that it can then be...
5
by: Bernard Davis | last post by:
Hi, I need to pass the value held in a field in one form and have it appear in another form. I specifically don't want to have to refer to the original form name as it has passed, because I...
0
by: NEMA | last post by:
hi all i would like to know how can i pass a value from one form to another. is there any method to do it thanks
7
by: Boki | last post by:
Hi All, I can't pass data to another form: in form2: private void button1_Click(object sender, EventArgs e) { Form1 form_copy = new Form1();
1
by: kunohiko | last post by:
Greets all... need help on reading value from another form under the same project. for example, i have frm1 and frm2, in frm2, i gotta use back the frm1.txtbox1.text value, how should i handle...
5
by: prasannagodbole67 | last post by:
IN c# : how to get value from another form .......................................... In 1st form there is a textBox that textbox value i want to another form in label.......
1
by: cleary1981 | last post by:
Hi, I have a form where I wish to pass one variable onto the next php page using a form action submit <form action="designmode.php?proj_id=document.getElementById("proj_id_hidden").value"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.