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

What is meant by dtd?, Question 1 Design a form based applications using l...

Question 1 Design a form based applications using labels, text boxes, and buttons to perform basic arithmetic operations on integers Question 2 Describe the concept of Except

Creating an order entry and editing application , Assume you are creating a...

Assume you are creating an order entry and editing application for a book store. An order consists of a product, quantity, total price, payment type including Credit/Debit card acc

The document - document view architecture, The Document: The document ...

The Document: The document contains the user's data. For illustration, after working on a text processor, the user may wish for to save the file. Such an action builds a docum

Introduction to visual c++ programming, INTRODUCTION to VISUAL C++ PROGRAMM...

INTRODUCTION to VISUAL C++ PROGRAMMING This section introduces you to develop the applications using VC++. The Single document interface (SDI), multiple document interface (MDI

Investment loan program, I have all my program done except the loan part th...

I have all my program done except the loan part that I am having a lot of troubles with

Running statements if a condition is true, To run only one statement while ...

To run only one statement while a condition is True, employ the single-line syntax for the If...Then...Else statement. The following instance shows the single-line syntax. Notice t

Events - intrinsic contol, Events: The Controls are placed on a form a...

Events: The Controls are placed on a form and then to make them functional an "event procedure" is related with the control object. An event process is what happens in respons

Associating images to toolbars - visual basic, Associating Images to Toolba...

Associating Images to Toolbars: 1. Add an Image list to your form from the tool box. 2. Pick the custom property of the image list. 3. Click the images tab. 4. Select

Hangman, how to add the hangman images

how to add the hangman images

Genetics, GENETICS 1.         The branch genetics started in 1900 after...

GENETICS 1.         The branch genetics started in 1900 after rediscovery of Mendel's work. 2.         Gregor Johann Mendel is called Father of genetics. 3.         The t

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