473,400 Members | 2,145 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,400 software developers and data experts.

Answer to placing values in a field in Tab A from Tab B

Last week there was a rather long exchange on this newsgroup titled Why this
no work" I will delineate the solution below. It is simple. I don't know
why someone else didn't suggest it. Oh well <g>. Instead of trying to
update the field in the usual way you have to update the datatable instead.

To restate the problem. I had a Winform with a tab on it. I had code in a
button on tabA that updated a field in tab A. I could put similar code in a
button on TabB (to update the the field in Tab A) but it would not work.
Same code, the only difference was that the code was being called from a
different tab. The code did work if the fields were not bound but in my
case the fields are bound. The solution to how to make the field in TabA
get updated with the proper value is to not try to do it with code like
this:

'Me.txtBalDue.Value = 4

But rather with code like this:

Dim Dt As DataTable
Dt = DsMain1.Tables("Contracts")
Dt.Rows(0)("BalDue") = 4


Nov 20 '05 #1
2 972
Hi Woody,

I suggested that

|| You say you set the TextBox value. Some last questions
||
|| Are you expecting the DataSource to update? Is it doing so?
|| If not, can you set the DataSource directly? If you do, does
|| your TextBox now display the correct value?

And so did Peter Huang.

|| I think you can work around the problem by change the value
|| of the dataset directly.
|| Private Sub Button1_Click(...) Handles Button1.Click
|| 'TextBox1.Text = "ee"
|| DataSet11.Tables(0).Rows(0)(0) = "ee"
|| End Sub

;-)

Regards,
Fergus
Nov 20 '05 #2
Fergus

Thank you for your help and interest. I am unable to find your suggestion
though I don't doubt you made it.

I did find Peter's suggestion. It was posted yesterday (Sunday) and I did
not see it today untill you brought it to my attention.

I do try to read the responses carefully. Thank you again to you and all
who try to assist.

Nov 20 '05 #3

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

Similar topics

0
by: Mickel Grönroos | last post by:
Hi, I'm trying to put an Tkinter.Entry of fixed size onto a specific location on a canvas using the place manager. The idea is that one can double-click a rectangle object on a canvas to get an...
0
by: Duncan Smith | last post by:
Hello, I'm not very experienced in SQL and I need some advice. I have a comma separarated values file containing around 20 million records and about 20 fields. There are many missing values...
1
by: tekanet | last post by:
Hello folks, first of all I really don't know how you gurus call this way of writing joins: SELECT A.FIELD, B.FIELD FROM TABLE_A A, TABLE_B B
1
by: Randell D. | last post by:
HELP! I am determined to stick with this... I'm getting there... for those who haven't read my earlier posts, I'm createing what should be a simple function that I can call to check that...
1
by: Ron | last post by:
I've got 3 tables table1 containing the field A en field B en C A en C always have a value, C sometimes C only has to be checked against table 4 when it's not zero table2 containing the field...
4
by: Andy Proctor | last post by:
I hope there is an answer out there.... I have a simple database structured like this (non relevant tables and fields omitted) Members table memberID memberFname memberLname memberNokID
2
by: Art Kedroski | last post by:
We are using .NET validators on most of our aspx pages. When the validator is contained within a datalist (i.e. the EditItemTemplate) the WebUIValidation.js file location tag is not rendered on...
1
by: Intrepid_Yellow | last post by:
Hi, I have the following code that runs my report generator. The user selects a table from a combo box, then whatever fields they want from a list box. (This part all works and the report runs...
3
by: mpar612 | last post by:
I have code below (due to length I only included a portion). I am validating an email address. It checks to see if the email field is blank, in the proper format, etc... It prints errors to the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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:
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
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
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
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,...
0
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...

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.