Adding records - data control, Visual Basic Programming

Assignment Help:

Adding Records:

1. As in the earlier case Set the DatabaseName property as "C:\ex.mdb", now Set the Record Source for the data control as Customer and Set the Record Type to 0.

2. Design a form with 5 text boxes and 2 command buttons new and update.

3. Put the DataSource to Data1 for all the text boxes.

4. Place the DataField property for each and every text box to the various fields of the Customer table.

5. Handle the Click event for new command button and type the handler as shown below:

data1.RecordSource = "Customer"

data1.Refresh

data1.Recordset.AddNew

Now Add New adds a buffer in the memory for a new record.

6. Handle the Click event for the command button, update it and type the handler as shown below:

data1.Recordset("Id") = CInt(text1.Text)

data1.Recordset("name")= text2.Text

data1.Recordset("address")= text3.Text

data1.Recordset("city")= text4.Text

data1.Recordset("state")= text5.Text

data1.Recordset.Update

Now update marks the record into the database.


Related Discussions:- Adding records - data control

Dialog based application - types of project using visual c++, Dialog Based ...

Dialog Based Application: The application which app wizard generates is based on the dialog template resource.

Explain class module and standard module, Difference between Class Module a...

Difference between Class Module and Standard Module? Standard module: -This place for variable declarations,procedures etc.& it can accessed these procedures in whereve

Create a procedure - vbscript, Each piece of data is passed in your process...

Each piece of data is passed in your process using an argument. Arguments serve like placeholders for the data you wish to pass into your process. You can name your arguments along

For next loop - vbscript, You can employ For...Next statements to run a blo...

You can employ For...Next statements to run a block of statements a specific number of times. For loops, employ a counter variable whose value is increased or decreased with each r

Looping, how to make logic of o program and how to use loop

how to make logic of o program and how to use loop

Runtime proggramming, i have a database i want mange it network and i want ...

i have a database i want mange it network and i want write it with vb.net so how i can do this

Develop a university database using ms-access, Question 1 Write about the ...

Question 1 Write about the Visual Basic Application Development Life cycle with a sample Forms development for performing integer arithmetic operations Question 2 Discuss the

Visual basic program, Create the flowcharts using MS Visio, MS Excel or MS ...

Create the flowcharts using MS Visio, MS Excel or MS Word to demonstrate the algorithm. Submit your flowchart under the assignment for CH7-4-26 Flowchart. Part Printouts H

Program to order a product from inventory, Write a program that permits the...

Write a program that permits the user to order a product from inventory. The user selects the product and enters the quantity. If there is sufficient quantity on hand of the produc

Software with inappropriate behavior - basics of gui design, Software With ...

Software With Inappropriate Behavior: You would save a document; print it, and then you'll try to close it. The program will ask you if you want to save. This is because; the

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd