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

DataGridView, 2 Forms and updating a database with textboxes

Hello,
I am a student and I need help with my VB task. I am currently using VB 2005 Express and I am fairly new to it, although I have programed in Delphi before.
--------------------------------------
My Problem is this:
--------------------------------------
I have 2 forms. The first form contains a DataGridView and a button. The DataGridView is bound to an access database, and loads at form_load. The second form contains several textboxes and a button. When I have entered data into all the text boxes, and then click the button, I want the database to be updated with these entries into a new row, and also have the DataGridView updated with the new row.

I have searched around and I keep coming up with different answers, also producing different errors. I managed to get the textboxes to update a DataGridView, but not a Bound DataGridView.

Any help at all is very much appreciated, and any suggestions welcome.
Thanks to all on the forum.
-SnowDog
Aug 13 '07 #1
2 2201
It sounds like if you use Form View data control, and enable editing, you should be able to accomplish this task easily.
Aug 30 '07 #2
Hello,
I am a student and I need help with my VB task. I am currently using VB 2005 Express and I am fairly new to it, although I have programed in Delphi before.
--------------------------------------
My Problem is this:
--------------------------------------
I have 2 forms. The first form contains a DataGridView and a button. The DataGridView is bound to an access database, and loads at form_load. The second form contains several textboxes and a button. When I have entered data into all the text boxes, and then click the button, I want the database to be updated with these entries into a new row, and also have the DataGridView updated with the new row.

I have searched around and I keep coming up with different answers, also producing different errors. I managed to get the textboxes to update a DataGridView, but not a Bound DataGridView.

Any help at all is very much appreciated, and any suggestions welcome.
Thanks to all on the forum.
-SnowDog
This article presents several ways of binding data to DataGridView.
Good luck.
http://msdn2.microsoft.com/en-us/library/fbk67b6z.aspx
Aug 30 '07 #3

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

Similar topics

0
by: Chad | last post by:
Hello Everybody, I am trying to update a few textboxes automatically in vb.net. I have a timer updating the variables which are assigned to the textbox.text attribute, I would like to have the...
2
by: Rich | last post by:
Hello, Following an example at http://www.vb-tips.com/dbpages.aspx?IA=DG (by Cor Lightert and Ken Tucker) on binding a dataRelation to a Datagridview for sqlClient, I was able to view rows...
3
by: Rich | last post by:
Hello, If I want to update data displayed in a datagrideview/datagridview cell, how can I determine what cell I am updating? I am looking at the click event below, for example. Can I get...
2
by: bob | last post by:
Can anyone tell me the best way to update a dataset while it is being edited/viewed in the DataGridView control? Is this something that should be inserted into one of the grid's events? or should...
3
by: Carlos Cruz | last post by:
Hi, I've a DataGridView with Datasourse = Datatable. The problem is that I can't get my last record updated at the database unless I change the row where I'm editing... Can anyone explain me...
7
by: John J. Hughes II | last post by:
I have a DataGridView with a TextBoxColumn. I setting the data source to a List<stringvalue in a static class. The list is filled from a background thread. So far all is fine and it works...
0
by: CSharpie1000 | last post by:
I am sorry for the broadness of this question, but I litterally can't get anywhere with this. I have a dataGridView that loads data from an Access 2007 Database. This works fine. I would like...
1
by: TG | last post by:
Hi! I have an application in which I have some checkboxes and depending which ones are checked those columns will show in the datagridview from sql server or no. After that I have 2 buttons:...
3
by: Andrus | last post by:
I have DataGridView in virtual mode containing 3500 rows. In code below, assigning to RowCount value to 3500 takes 8 seconds. CPU usage goes high at this time. Stepping by F11 into user code shows...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.