5
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by jhai_salvador
0

hai
please any body can give me code how to insert one row in already prepared table in ms access

Hi regalla_c,

Try these SQL codes. Hope these codes will help you.

'declaration
Option Explicit
Dim DB As Database
Dim S As String

Private Sub Form_Load()
Set DB = OpenDatabase(App.Path + "\Gbusiness.mdb")
End Sub

Private Sub CmdAdd_Click()
'Adding new record
S = "Insert into TeamAddress (slno, Name, Address) values("
S = S + "'" + Text1.Text + "'" + ","
S = S + "'" + Text2.Text + "'" + ","
S = S + "'" + Text3.Text + "'" + ")"
DB.Execute (S)
End Sub
0

Hi,
I don't think P.manidas' code will Add New row to already created Table however it may add records to database.

Thankx

0

try this if using ADODB for database connection.

conn.begintrans            'ADODB connection object.
conn.execute "your insert statement goes here"
conn.committrans
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.