473,378 Members | 1,142 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,378 software developers and data experts.

Read from one form to another

I have a button_click event handler with the following code:

string str = lbStaff.SelectedItem.ToString();
getID(ref str);
Form1 fm = new Form1();
fm.txtID.Text = str;

where lbStaff is the name of a listbox, getID is a method which extracts the
ID from a string which includes the ID and full name, txtID is the name of a
textbox in Form1 and Form1 is the name of the main form.

i've been through the debugger, stepping through the event handler and the
output window shows that str = "2", which is the result that I require.
However, the number 2 does not appear in the txtID textbox.

Any suggestions?
Nov 16 '05 #1
0 810

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Håkan Persson | last post by:
Hi. I am trying to set up a simple HTTP-server but I have problems reading data that is beeing POSTed. class httpServer(BaseHTTPServer.BaseHTTPRequestHandler): def do_POST(self): input =...
7
by: Nik Coughin | last post by:
Is there a simple way of opening a text file from a server, and reading from it line by line? IE http://someserver/file.txt contains a couple of hundred lines. Each line is the name of a...
3
by: Pavils Jurjans | last post by:
Hello, I have bumped upon this problem: I do some client-side form processing with JavaScript, and for this I loop over all the forms in the document. In order to identify them, I read their...
1
by: libbythomas | last post by:
I created an Access 2000 form from a query. But I cannot edit it. I can flip through the records. If I create a table from the query (maketable) and then create the form from the table, it is...
2
by: tdmailbox | last post by:
I have an access form that has VB code to enable and disable individual fields depending on the state of other fields. That works great. However, now I am looking to create a read only version...
3
abdoelmasry
by: abdoelmasry | last post by:
Hi Friends i need help in sessions im passing variables between pages using sessions this is the main page thats mean the home page the main page have table to show messages for users , it have...
4
by: farhaaad | last post by:
Hi all, i wanted to know how can i make my mdb file read only recommended, i mean when the user opens the database with holding the SHIFT key it shouldn't be read only and when opening the...
6
by: Franck | last post by:
I know in vb6 it was super easy to pass parameter or either read example the textbox1.text on the already open form form2 like all object were as public. but is there a way to do something that...
6
by: Scott Gravenhorst | last post by:
Windows XP SP3 My application is set to open a SaveFile dialog when an exit is requested. When I click the app's close button, the save dialog opens, but when I click to change the folder, the...
11
beacon
by: beacon | last post by:
Hi everybody, I created a database that links one table from an ODBC data source. I saved my password and UID to the data source so neither myself nor anyone else would have to login each time...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.