473,511 Members | 12,747 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Populating Textboxes Across Forms & TabControls

I've got a tabcontrol with a number of databound textboxes on a tabpage
(Form1). I've got a button that the user clicks that opens a dialog (Form2)
and does a lookup from a database. The user makes a selection and chooses a
button wired dialog.ok to close the dialog (form2) and populate the fields on
tabcontrol (Form1). It all works except the textboxes don't retain the new
data when I tab across to another tab page.

Code To Open Dialog (Form1)=========================

private void btnLmoLookup_Click(object sender, System.EventArgs e)
{
Form2 LmoLookup = new Form2();
LmoLookup.StartPosition = FormStartPosition.CenterParent;
if( LmoLookup.ShowDialog() == DialogResult.OK )
{
txtBoxDocName.Text = LmoLookup.docFullName;
}
LmoLookup.Dispose();
}

Code To Create Public Variable (Form2)======================

public string docFullName
{
get{return
this.dsExtPhysLookup1.Tables["tblExternalPhysicians"].Rows[this.listBox1.SelectedIndex]["docFullName"].ToString();}
}
Nov 17 '05 #1
0 1141

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

Similar topics

7
4063
by: Drew | last post by:
I have a db table like the following, UID, int auto-increment RegNo Person Relation YearsKnown Now here is some sample data from this table,
1
1521
by: Boniek | last post by:
Hi Sometimes I have problems with my forms which are inherited from other forms and base forms are in other project. When I change something in base forms my normal forms are broken in Visual in...
3
1562
by: luna | last post by:
theres no errors in my code - but it does nothing at all - its supposed to be populating text boxes!! any ideas ? (im am pretty new to all this) If Not Page.IsPostBack Then Dim search As...
3
2620
by: RFS666 | last post by:
Hello together, I tried to find out about populating an asp.net server control (a dropdownlist) from the clientside jscript, but I didn't find a solution up to now. I cannot use a html...
9
7026
by: netasp | last post by:
hi all, how can I populate one aspx form when page is loading based on page ID? for example: loading page A (to search for VB code) would display labels and texboxes, dropdown lists all related...
3
1979
by: Bob Alston | last post by:
I have recently been trying to determine the best technique to pull the least amount of info across the LAN link in a slow speed LAN situation (e.g. < 10 Mbps), where data volume = performance. ...
13
3509
by: Mary | last post by:
I'll pulling my hair out on this one and would be so appreciative of any help. I am creating a data entry form to enter results of a student survey. There are 40 questions on the survey. The...
2
2410
by: tara99 | last post by:
My question is in regard to writing VBA to automate things in MS word. I have a template such as a letter to a business unit or some one which can be used repeatedly. I have few fields in this...
6
8432
by: slinky | last post by:
I have a form called "subCalendar" with two unbound textboxes I simply need to Sum. I used this below, but get an error. I have the textboxes set to general number. Any ideas? Thanks! ...
0
7251
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
7148
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
7367
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7430
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5673
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,...
1
5072
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1581
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
790
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.