473,545 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combo box; Add New; Save; Delete Buttons

16 New Member
Hi there, I have created a windows form application where I've placed a combo box; a load button and three data-grids. All these receive their data from a SQL Database. The combo box from table1. The three data grids from table 2, 3, and 4. Now when I click the load button data in the database is displayed in the respective controls. What I need now , is the code for the Add New button to clear the controls ; the delete button, to delete the record with the focus on it ; the save button to save the newly added record to the database. Please Help... :-(
Sep 16 '09 #1
2 3584
MrMancunian
569 Recognized Expert Contributor
What did you try yourself so far?

Steven
Sep 16 '09 #2
Kappucino XL
16 New Member
@MrMancunian
Well, since my load button(whichwor kks) code is :
this.table1Tabl eAdapter.Fill(t his.tableDataSe t.Categorytable );
this.table2Tabl eAdapter.Fill(t his.table2DataS et.Categorytabl e);
this.table3Tabl eAdapter.Fill(t his.table3DataS et.Categorytabl e);
this.table4Tabl eAdapter.Fill(t his.table4DataS et.Categorytabl e);


I tried replacing yhe word "Fill", with Delete, for the Delete Button ; and ClearBefore Fill for the AddNew Button.

For my save Button, I used :
this.Validate() ;
this.table1Bind ingSource1.EndE dit();
this.table2Bind ingSource.EndEd it();
this.table3Bind ingSource.EndEd it();
this.table4Bind ingSource.EndEd it();
this.tableAdapt erManager.Updat eAll(this.Datab aseDataSet);


Hope I'm on the right track... :-(
Sep 16 '09 #3

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

Similar topics

1
2860
by: Alex Wisnoski | last post by:
Access 97SR2-I am trying to create a Job Position data entry form based on a table. The form has 15 fields on it. I want to use a combo box to look in the table and see if the position number already exists. If the position exists, then pull up that record and display the information on the form. If the position doesn't exist, inform the...
4
7147
by: meganrobertson22 | last post by:
Hi Everyone- I have a question about how to add and then use the "All" selection in a combo box. I am trying to figure out how to: (1) add "All" as a selection to a combo box and then (2) how to use the selection "All" as criteria for a field in a query, which is used to generate data for a report.
3
4255
by: Frustrated Developer via DotNetMonster.com | last post by:
I have posted a couple times on here already and found the user community to be very helpful. I took on a project before I realized how difficult a time I'm having working with a database. Assistance would be greatly appreciated! I am trying to allow certain users to be able to preview a database's contents without being able to update which...
14
4948
by: Kevin | last post by:
A couple of easy questions here hopefully. I've been working on two different database projects which make use of multiple forms. 1. Where's the best/recommended placement for command buttons for things like delete, save, edit, cancel buttons - in the footer, or on the form detail section? 2. If in the footer, how do you add them to the...
2
2433
by: kiranmn75 | last post by:
I want to dynamically populate a combo box through javascript. Data is coming from a array. Sometimes data list may contain items in excess of 2000. Explorer takes more than 5 seconds to populate the combo (for a list of 2500). Can anybody optimize the code. I tried Duffs devise instead of 'for loop', but no improvement.
2
5818
by: AA Arens | last post by:
During my database construction, I left the names of the buttons, comboboxes named by default like Combo77, Command43. I can rename them with Properties Other Name, but them I start getting troubles with the VB. Is there any solution, or tool to have this renamed and autorenamed all values in VB? Bart Acc 2003
2
1429
by: sara | last post by:
I think I don't understand combo boxes and forms - and all that I'm reading is just confusing me more. I am doing a "favor" for a non-profit organization. They take a phone call and need to either 1. See the client record OR 2. Add a new record if the cient isn't in the database. I got this to work if I have a form open just showing...
0
1593
by: dudeja.rajat | last post by:
On Sat, Aug 30, 2008 at 2:32 PM, Fredrik Lundh <fredrik@pythonware.comwrote: Fredrik, Thanks so much. That worked. Following this, I can now see that my combo2 has no previous elements and contains only the elements relevant to selection in combo1. Now, as soon as I select something in combo 2 and go back to change selection in combo1...
11
3710
tdw
by: tdw | last post by:
Hi all, I have tried a few different methods to accomplish this, but with no luck. I will post the code for the latest attempt at the end of this post. I work at a land surveying company. This database is for tracking survey orders. One of the fields is for entering the Subdivision that the parcel of land is in. That field on the New Orders...
0
7478
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7668
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7923
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
5343
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3466
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1901
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 we have to send another system
1
1025
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.