How to Add/Update/Delete Record using MS Access Database
The primary purpose of this code is to teach beginner programmer to familiarize the concept of database programming.
This is particularly for beginner but may also applicable for intermediate programmer.
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
Comments
kornikalamode
Tue, 08/02/2011 - 09:01
Permalink
Null reference exception
hi.. i downloaded your project.. as i study it, i created my own project and copied your code but change the variables and the database.. as i debugged the codes an error came out.. i checked the codes from my project to yours and found no errors..
this is what it said..
Unable to cast object of type 'System.Data.OleDb.OleDbException' to type 'System.Data.OleDb.OleDbDataReader'.
and it's pointing from the module form "FillListView(lvVehicles, GetData(sSql))" line..
thank you very much..
Anonymous (not verified)
Tue, 08/02/2011 - 08:22
Permalink
please help
i downloaded your code, studied and copied it but i changed the variables.. but when i run my program it always shows an error..
It says. Unable to cast object of type 'System.Data.OleDb.OleDbException' to type 'System.Data.OleDb.OleDbDataReader'...
What do you think is the problem? The error came from the module form, in the FillListView(lvVehicles, GetData(sSql)) line..
thanks you very much..
Anonymous (not verified)
Sun, 10/16/2011 - 00:46
Permalink
HI
it's an error from ur compilation
Anonymous (not verified)
Sat, 07/30/2011 - 02:26
Permalink
how to make a edit button in access 2003
plzzzz hellp me
i tink i need code if i do plzzzz help me
Anonymous (not verified)
Tue, 07/26/2011 - 00:48
Permalink
thank
thank you
Anonymous (not verified)
Mon, 07/25/2011 - 17:08
Permalink
Updatign code
I'm using VB.NET 2008 my update code is like that how can tell me the error
Try
If MsgBox("Are You Sure You Wish To Delete " & txtuserid.Text & "?", vbYesNo + vbQuestion, "Delete Record?") = vbYes Then
myconn.Open()
Dim str As String = "delete from useraccount where Userid='" & txtuserid.Text & "'"
Dim cmd As New SqlCommand(str, myconn)
cmd.ExecuteNonQuery()
'Display Success Message
MsgBox("The Record Has Been Deleted Successfully!", vbInformation, "Successful Delete Procedure!")
c.clearallfields(grp.Controls) 'Calling a Private Function To Clear All Fields
Else
'Display 'Delete Procedure Cancelled' Message
MsgBox("The Delete Procedure Was Cancelled!", vbExclamation, "Delete Procedure Cancelled!")
c.clearallfields(grp.Controls) 'Calling a Private Function To Clear All Fields
End If
Me.Close()
MDIParent1.Button3.PerformClick()
myconn.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
Anonymous (not verified)
Fri, 09/09/2011 - 10:45
Permalink
hi
//hello i ned the codes for adding and searching editing and updating plz// thanks!!!
Anonymous (not verified)
Sat, 07/23/2011 - 22:16
Permalink
nakakahilo
arrggghhhh* ang sakit sa ulo magprogram.. ang hirap di ko magawa, saan ba ko magsisimula. patulong naman anu bang magandang gamitin na software para sa payroll system? beginner palang ako sa paggawa ng program, any suggestions? tnx a lot :D
Anonymous (not verified)
Sun, 07/17/2011 - 13:55
Permalink
how to connect ms access with c++
hi............
i need to do library management system using c++ with the backend ms access... can any one tell me how to connect ms access with the c++ coding for library management system
jacky
Sat, 06/25/2011 - 13:38
Permalink
can't shown the data record in list view after insert data!
hi...i am new in programming....recently i have download your coding and try to edit or modify it to the program i want....lastly i successful modify it but it can shown the data insert in the list view but the data in successfully insert to ms access d. Can you please help me troubleshoot it?? thanks a lot:)
[email protected]....
Anonymous (not verified)
Thu, 06/23/2011 - 17:26
Permalink
help me with the log in system in C#.net
i need codes for log in system in c#.net based from ms access database. the user can log in based from the registered/saved username and password in ms access database. i urgently need it. please help. Thanks. T_T...
Anonymous (not verified)
Thu, 06/23/2011 - 13:12
Permalink
Hi! How to Add data in SQL Server using a form Add New Entry
Hi Master in VB.Net and SQL Server..
Please help me i cannot add new data in sql server as my backend only update are working...
below is my code:
Imports System.Data.SqlClient
Public Class frmUsers
Private cs As New SqlConnection("Data Source = PC_ROB\SQLEXPRESS;Initial Catalog=GTIGOLDEN;Integrated Security=True")
Private da As New SqlDataAdapter("SELECT * FROM tblUsers", cs)
Private ds As New DataSet
Private cmb As New SqlCommandBuilder(da)
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.Top = 200
Me.Left = 200
Me.WindowState = 0
cs.Open()
da.Fill(ds, "tblClients")
dg.DataSource = ds.Tables("tblClients")
cs.Close()
End Sub
Private Sub btnClose_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click
Me.Close()
End Sub
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Dim x As Integer
da.UpdateCommand = cmb.GetUpdateCommand
x = da.Update(ds.Tables("tblUsers"))
MsgBox(x & " Record(s) Updated")
End Sub
Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click
Dim sqlcom As New SqlCommand
sqlcom.Connection = cs
If u_txtempid.Text <> "" And u_txtuname.Text <> "" And u_txtempname.Text <> "" And u_txtupos.Text <> "" And u_cmbacc <> "" And u_txtpass.Text <> "" Then
Call Confields()
dg.Update()
MsgBox("New User has been added., MsgBoxStyle.Information")
End If
Try
Catch ex As Exception
End Try
da.Fill(ds, "tblClients")
dg.DataSource = ds.Tables("tblClients")
End Sub
Private Sub Confields()
dg.DataSource!EmployeeID = u_txtempid.Text
dg.DataSource!UserName = u_txtuname.Text
dg.DataSource!EmployeeName = u_txtempname.Text
dg.DataSource!Position = u_txtupos.Text
dg.DataSource!AccessLevel = u_cmbacc.Text
dg.DataSource!Password = u_txtpass.Text
End Sub
Private Sub Retfields()
u_txtempid.Text = dg.DataSource!EmployeeID
u_txtuname.Text = dg.DataSource!UserName
u_txtempname.Text = dg.DataSource!EmployeeName
u_txtupos.Text = dg.DataSource!Position
u_cmbacc.Text = dg.DataSource!AccessLevel
u_txtpass.Text = dg.DataSource!Password
End Sub
End Class
lbraeckm
Wed, 06/22/2011 - 04:25
Permalink
Query database and update some fields from the queried rows
Hello,
your example helped me a lot.
However, I'm facing a problem:
I did a query according:
.. as the IntCardNr variable is a unique number, the query results in a single row from my database following code displays it:
Now I want to update a couple of fields (LastLog and NumLessons)
what would be the best approach to achieve this?
Anonymous (not verified)
Wed, 06/15/2011 - 13:07
Permalink
please help me..
Hi,
I need code for add,edit,delete,update records in Access Database using C#.
Plz help me as early as possible. plz provide code me on my mail id: [email protected]
Thank You.
Anonymous (not verified)
Mon, 06/13/2011 - 10:37
Permalink
Thanks, you helped me
Thanks, you helped me
Anonymous (not verified)
Fri, 05/13/2011 - 18:57
Permalink
hai plz provide me the code
hai
plz provide me the code for reading the values from textbox in the vb form and get saved to ms access data base
plz send me the code
to [email protected]
Anonymous (not verified)
Wed, 05/04/2011 - 16:13
Permalink
matindi tlga ang mga
matindi tlga ang mga programmer,,,astig...paturo nga..tsk..
gradauting n lmang aq,,haizt
Anonymous (not verified)
Mon, 05/09/2011 - 10:07
Permalink
---->
wahahaha. .Dota na lng tayo.. yan kc.
Anonymous (not verified)
Thu, 05/12/2011 - 14:24
Permalink
c",)
maganda yung parehong kang magaling.. magaling ka mag dota then magaling ka rin mag programming.. dobol kill yun! eh ang dota gawa yan sa VB platform
Anonymous (not verified)
Sat, 03/26/2011 - 13:28
Permalink
vb.net cod for save
i'm using ms access 2007 and i need the right code for save using vb.net
my email is
[email protected]
Anonymous (not verified)
Mon, 08/08/2011 - 08:47
Permalink
this code is intended for vb.net save
tutorial for vb.net 2008
first import the following in the reference:
3 files of adodb reference files.
Start coding:
Dim dc As New ADODB.Connection
Dim rs As New ADODB.Recordset
dc.Open("Provider = microsoft.jet.oledb.4.0; data source = filename.mdb")
rs.Open("tablefilename", dc, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockOptimistic)
rs.MoveFirst()
rs.AddNew()
rs.Fields("txtsample").Value = txtsample.Text
rs.Update()
rs.Close()
dc.Close()
Anonymous (not verified)
Mon, 03/21/2011 - 17:55
Permalink
help..kindly explain..
strDeleted = ExecNonQuery("DELETE Customers.CustomerID FROM Customers WHERE CustomerID= '" & CustomerID & "'")
please..
the 2 "Customers" is the name of the table in MS ACCESS ryt?
how about the three "CustomerID"?
Anonymous (not verified)
Fri, 04/29/2011 - 18:05
Permalink
u should mention delete
u should mention delete tablename from table where condition thats all
and at last one more single code is not necessary
ok;....
ced
Wed, 03/23/2011 - 16:59
Permalink
Where CustomerID = table
Where CustomerID = table field...
'" & CustomerID & "' = variable... holds the customerId for checking...
Anonymous (not verified)
Mon, 03/21/2011 - 17:35
Permalink
add and update in access database
I hv made connection with access database successfully. I can Add rows also successfully but unable to update the table.
I can show data in datagridview and want to add new, update, delete the selected rows.
I can add and delete successfully but unable to update the selected rows within database.
I can use the flag property in VB.net. i can add rows with its value property false and want to update the selected row on its value true.
Please help me asap. on the e-mail id
[email protected]
Thanks & regards
Shilpi garg
Anonymous (not verified)
Sat, 07/02/2011 - 15:08
Permalink
Please send the vb code
How to use flag for update a row in sql database by using vb.
Anonymous (not verified)
Sun, 03/20/2011 - 16:09
Permalink
how to changing next record vb.net to access
dear sir, am added to the records in access ... but i want to change and show records one by one please reply me ...
thanking you always
Anonymous (not verified)
Wed, 05/11/2011 - 17:45
Permalink
you can use adodc for that to
you can use adodc for that
to show the data one after the other
Anonymous (not verified)
Thu, 03/17/2011 - 14:28
Permalink
database connectivity for vb.net with oracle and sql
plz help me
how to add data in database from my windows application
suggest me code with output
thax
Anonymous (not verified)
Thu, 03/17/2011 - 10:34
Permalink
Thank You
It was really useful, thank you for teach us how to do this. :D
Anonymous (not verified)
Fri, 03/04/2011 - 16:06
Permalink
Calling texbox as wel as make updation on single button
Hi,
I want to make two function on single button(Say Update and diplaying textBox). On first click it should shows textbox, which is panel after click on panel's button(say OK) the first button(Update) run second function(Say it get Updated).
Plz help me. :)
Anonymous (not verified)
Sun, 02/13/2011 - 23:24
Permalink
how to connect vb to access
sir,
I can't find the step by step process in your zip file. please sir, i need the documentation on how to do it from start to finish. Im new in this kind of programming but i really want to learn. im using visual basic in visual studio express 2010. hoping for your kindness. Thank you so much!
Anonymous (not verified)
Wed, 02/02/2011 - 20:31
Permalink
please help me..i want for code for add,edit,delete,update
im a beginner in vb.net 2008,i want someone who could help me to develop a simple inventory system using ms access07..i realy appreciate if someone could help me on this...i need it asap,thank you,my e-mail add is [email protected]
Anonymous (not verified)
Tue, 04/19/2011 - 21:12
Permalink
please help me..i want for code for add,edit,delete,update
this is a single program of all there stuff......................
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Data.SqlClient;
using System.Windows.Forms;
namespace CompleteADO
{
public partial class Form1 : Form
{
SqlDataAdapter da;
DataSet ds;
SqlCommand com;
SqlConnection con;
DataTable dt;
int curr = 0;
int totr = 0;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string constring = @"Data Source=DEEPAK-7FD6C5E5\MANISH;Initial Catalog=manishv;Integrated Security=true";
con = new SqlConnection(constring);
con.Open();
com = new SqlCommand("Select * from customer", con);
da = new SqlDataAdapter(com);
ds = new DataSet();
da.Fill(ds, "cust");
dt = ds.Tables["cust"];
curr = 0;
totr = dt.Rows.Count;
fillcontrol();
initlizecomm();
togglecontrol(true);
}
public void fillcontrol()
{
textBox1.Text = dt.Rows[curr]["cid"].ToString();
textBox2.Text = dt.Rows[curr]["nm"].ToString();
textBox3.Text = dt.Rows[curr]["loc"].ToString();
}
private void button2_Click(object sender, EventArgs e)
{
curr++;
if (curr >= totr)
curr = 0;
fillcontrol();
}
private void button3_Click(object sender, EventArgs e)
{
curr--;
if (curr < 0)
curr = totr - 1;
fillcontrol();
}
public void initlizecomm()
{
da.InsertCommand = con.CreateCommand();
da.InsertCommand .CommandText ="insert into customer"+"(cid,nm,loc)"+"values(@cid,@nm,@loc)";
addparams(da.InsertCommand, "cid", "nm", "loc");
da.UpdateCommand = con.CreateCommand();
da.UpdateCommand.CommandText = "update customer set " + "[email protected],[email protected],[email protected] " + "where [email protected]";
addparams(da.UpdateCommand, "cid", "nm", "loc");
da.DeleteCommand = con.CreateCommand();
da.DeleteCommand.CommandText = "delete customer where [email protected]";
addparams(da.DeleteCommand, "cid");
}
public void addparams(SqlCommand com, params string[] col)
{
foreach (string co in col)
{
com.Parameters.Add("@" + co, SqlDbType.Char, 0, co);
}
}
public void togglecontrol(bool val)
{
textBox1.ReadOnly = val;
textBox2.ReadOnly = val;
textBox3.ReadOnly = val;
button1.Enabled = val;
button2.Enabled = val;
button3.Enabled = val;
button4.Enabled = val;
button5.Enabled = val;
button6.Enabled = val;
button7.Enabled = !val;
button8.Enabled = !val;
}
private void button4_Click(object sender, EventArgs e)
{
togglecontrol(false);
}
private void button7_Click(object sender, EventArgs e)
{
DataRow dr = dt.Rows[curr];
dr.BeginEdit();
dr["cid"] = textBox1.Text;
dr["nm"] = textBox2.Text;
dr["loc"] = textBox3.Text;
dr.EndEdit();
da.Update(ds, "cust");
ds.AcceptChanges();
togglecontrol(true);
}
private void button5_Click(object sender, EventArgs e)
{
DataRow dr = dt.NewRow();
dt.Rows.Add(dr);
totr = dt.Rows.Count;
curr = totr - 1;
dr["cid"] = totr;
textBox1.Text = totr.ToString() ;
textBox2.Text = "";
textBox3.Text = "";
togglecontrol(false);
}
private void button6_Click(object sender, EventArgs e)
{
DataRow dr = dt.Rows[curr];
dr.Delete();
da.Update(ds, "cust");
ds.AcceptChanges();
totr--;
curr = totr - 1;
fillcontrol();
}
}
}
Anonymous (not verified)
Fri, 01/28/2011 - 21:30
Permalink
hello any body that can help
hello any body that can help me pls
I successfully insert the record from my from to the
ms access database using vb6 with the datagrid
the problem is unable to update the autoNumber
and unable to delete and update the record
as needed.
the code that I use for deleting the record is
Dim iResponce As Integer
iResponce = MsgBox("Do you want to Delete this record?", vbOKCancel + vbQuestion, "Delete")
If iResponce = vbOK Then
rs.Delete
txtOffice_code.Text = ""
CboOffice_name.Text = ""
Else
rs.CancelUpdate
txtOffice_code.Enabled = False
CboOffice_name.Enabled = False
Anonymous (not verified)
Fri, 01/21/2011 - 22:09
Permalink
java
i need delete record from ms access in front end.. pls tel this codngs... [email protected],plz..plz..
Anonymous (not verified)
Thu, 01/13/2011 - 17:54
Permalink
VB.NET CODING
I NEED how u add delete records in database
from frontend,in vb.net
pls hepl me for this
my email :[email protected]
Anonymous (not verified)
Tue, 12/21/2010 - 00:14
Permalink
i need coding
i need coding of insert ,update, and delete...... in c sharp plzzzzzzzzzzz help
ced
Tue, 12/21/2010 - 18:16
Permalink
try
look for my work.. i have a simple add,edit in c#...
"simple database manipulation in c#"
point to search engine!!!!!!!!!!!
Anonymous (not verified)
Mon, 02/21/2011 - 19:08
Permalink
pls..help me in making a program
Hi..pls help me in making program that can save, delete, edit and search record..
Anonymous (not verified)
Sat, 10/30/2010 - 08:34
Permalink
Update records with Primary Key does not work?
Hello. I have wasted a lot of time reading and searching the internet for answers to my apparently simple problem. I remembered your site and, tonight, while searching for answers, I stumble on your site by accident -- thank's to Bing.
Anyway, all the examples I run into don't deal with tables that have Primary Keys. I have a small VisualBasic 2010 application that writes to an MS-Access database (*.mdb). Inserting records works, and I had to search hard how to retrieve the Primary Key after insert completed to be able to have it to use as a Foreign Key in my related table. So, my database is very easy, it has only two tables with a one to many relationship.
When I want to update the records, I use the DataAdapter to fill a DataSet. Then I can display the records easily. But the DataAdapter Update method does not work for me, after I make change the fields and want to persist to the DataSource (my MS-Access database).
I suspect VisualBasic will not update the database unless it is instructed specifically on how to deal with the Primary Key issue? At one point, I suspected I have to first update the child table (even though I make no changes to it) in order for the Update on the Parent table to work. But that does not make sense.
I do use CommandBuilder.
[email protected]
ced
Sat, 10/30/2010 - 11:04
Permalink
every table must have a
every table must have a PKey.. and use dat PrimaryKey in updating ur records..
admin
Sat, 10/30/2010 - 10:52
Permalink
re: Update records with Primary Key does not work?
Each table must have primary key. You do not need to know the primary key of the primary table since updating is done by using a relationship which you set under the dataset designer.
ced
Sat, 10/30/2010 - 11:07
Permalink
sir
any equivalent itemdata in .net sir? exept the use of class and structures...
any method?
admin
Sat, 10/30/2010 - 19:45
Permalink
re: sir
What do you mean by itemdata?
Anonymous (not verified)
Sat, 10/30/2010 - 22:41
Permalink
itemdata for combobox and
itemdata for combobox and listbox in .NET. obsolete poh kasi itemdata sa .NET..
admin
Sun, 10/31/2010 - 10:02
Permalink
re: itemdata for combobox
In .NET version you need to fill the ComboBox using dataset. You can also fill it programmatically using the Add properties.
Anonymous (not verified)
Mon, 10/18/2010 - 23:36
Permalink
update record in access using excel VB code
using the open.record.set command in excel VB I want to find the access record to update and then pass the data to the appropriate fields. Here is the code that doesn't work. It appears not to have bugs - but then there is nothing happening - no updates. I should mention that the "AddNew" part works just not the "edit" part that is down further.
Sub Export_tear_data()
'
' Upload Macro
' Macro recorded 11/18/2009 by LAB1
'
Sheets("Summary").Select
Range("A5").Select
Sheets("Summary").Select
ActiveWorkbook.save
'Application.Quit
Dim db As Database, rs As Recordset, r As Long, sa As Recordset
Set db = OpenDatabase("X:\PAPLab\PAPLabTables.mdb")
' open the database
' get all records in a table
'Start Data Transfer
Set sa = db.OpenRecordset("ResultTens", dbOpenTable)
r = 7 ' the start row in the worksheet
Do While Len(Range("A" & r).Value) > 0
' repeat until first empty cell in column A
If Range("Q" & r).Value = "- No -" And Len(Range("c" & r).Value) > 0 Then ' Checks if record exists
'With sa
sa.AddNew
If IsNumeric(Range("B" & r).Value) Then
sa.Fields("ResultTensSampleNo") = Range("B" & r).Value
End If
If IsNumeric(Range("C" & r).Value) Then
sa.Fields("ResultTensElmMDR1") = Range("C" & r).Value
End If
If IsNumeric(Range("D" & r).Value) Then
sa.Fields("ResultTensElmMDR2") = Range("D" & r).Value
End If
If IsNumeric(Range("E" & r).Value) Then
sa.Fields("ResultTensElmMDR3") = Range("E" & r).Value
End If
If IsNumeric(Range("F" & r).Value) Then
sa.Fields("ResultTensElmMDR4") = Range("F" & r).Value
End If
If IsNumeric(Range("G" & r).Value) Then
sa.Fields("ResultTensElmMDR5") = Range("G" & r).Value
End If
If IsNumeric(Range("J" & r).Value) Then
sa.Fields("ResultTensElmTDR1") = Range("J" & r).Value
End If
If IsNumeric(Range("K" & r).Value) Then
sa.Fields("ResultTensElmTDR2") = Range("K" & r).Value
End If
If IsNumeric(Range("L" & r).Value) Then
sa.Fields("ResultTensElmTDR3") = Range("L" & r).Value
End If
If IsNumeric(Range("M" & r).Value) Then
sa.Fields("ResultTensElmTDR4") = Range("M" & r).Value
End If
If IsNumeric(Range("N" & r).Value) Then
sa.Fields("ResultTensElmTDR5") = Range("N" & r).Value
End If
'Upload Arm Weight
If IsNumeric(Range("R" & r).Value) Then
sa.Fields("ResultTensElmMDArm") = Range("R" & r).Value
End If
If IsNumeric(Range("S" & r).Value) Then
sa.Fields("ResultTensElmTDArm") = Range("S" & r).Value
End If
sa.Update
End If
'If record for sample already exists
If Range("Q" & r).Value = "- Yes -" Then
sa.Edit
If IsNumeric(Range("B" & r).Value) Then
sa.Fields("ResultTensSampleNo") = Range("B" & r).Value
End If
If IsNumeric(Range("C" & r).Value) Then
sa.Fields("ResultTensElmMDR1") = Range("C" & r).Value
End If
If IsNumeric(Range("D" & r).Value) Then
sa.Fields("ResultTensElmMDR2") = Range("D" & r).Value
End If
If IsNumeric(Range("E" & r).Value) Then
sa.Fields("ResultTensElmMDR3") = Range("E" & r).Value
End If
If IsNumeric(Range("F" & r).Value) Then
sa.Fields("ResultTensElmMDR4") = Range("F" & r).Value
End If
If IsNumeric(Range("G" & r).Value) Then
sa.Fields("ResultTensElmMDR5") = Range("G" & r).Value
End If
If IsNumeric(Range("J" & r).Value) Then
sa.Fields("ResultTensElmTDR1") = Range("J" & r).Value
End If
If IsNumeric(Range("K" & r).Value) Then
sa.Fields("ResultTensElmTDR2") = Range("K" & r).Value
End If
If IsNumeric(Range("L" & r).Value) Then
sa.Fields("ResultTensElmTDR3") = Range("L" & r).Value
End If
If IsNumeric(Range("M" & r).Value) Then
sa.Fields("ResultTensElmTDR4") = Range("M" & r).Value
End If
If IsNumeric(Range("N" & r).Value) Then
sa.Fields("ResultTensElmTDR5") = Range("N" & r).Value
End If
sa.Update
End If
'MsgBox ("Sample " & Range("A" & r).Value & " already exists in the tensile data table. ")
'DoEvents
sa.MoveLast
r = r + 1 ' next row
Loop
sa.Close
Set sa = Nothing
Anonymous (not verified)
Mon, 09/27/2010 - 22:26
Permalink
Edit and Update the database in C#.NET
Gud day sir
Please I want to know how I can edit and save records into the database. Please i created a form whereby the user will enter a password and will click on a button and the next form will display, but i have tried "Close() code" but it didn't work, please what should I do?
Thanks
Regards,
Chioma
[email protected]
reply
Anonymous (not verified)
Mon, 09/27/2010 - 11:32
Permalink
how can i connect ms access to vb
good day!
can you help me about my project. How to connect ms access 2003 to vb
thanx
Pages
Add new comment