can you help my with the code for my cmdDone to add a new record into my database, i can't seem to get it here is my project http://dl.dropbox.com/u/9153815/Unknown.rar
no luck even with tutorials
Shodow
3
Junior Poster
Recommended Answers
Jump to PostHeres a sample on how to add a record to database.
Dim rstInfo As New ADODB.Recordset Dim SQL as String SQL = "SELECT * FROM List" rstInfo.Open SQL, cn, adOpenStatic, adLockOptimistic rstInfo.AddNew rstInfo!CustomerName = txtName.Text rstInfo!ContactNumber = txtContact.Text rstInfo!Date = txtDate.Text rstInfo!TimeStart = txtStart.Text rstInfo!TimeEnd = txtEnd.Text …
Jump to PostReplace your module code with this.
Public CN As New ADODB.connection Public rs As New ADODB.Recordset Public Sub CON() With CN .Provider = "Microsoft.Jet.OLEDB.4.0" .ConnectionString = "Data Source=" & App.Path & "\Database1.mdb" ' so that you dont have to specify the whole drive path of your database …
Jump to PostOn your save button code, put this between line 26 and 28.
frmList.Adodc.Refresh frmList.DataGrid1.Refresh
All 10 Replies
jhai_salvador
48
Junior Poster
Shodow
3
Junior Poster
abelingaw
69
Posting Whiz in Training
Shodow
3
Junior Poster
abelingaw
69
Posting Whiz in Training
Shodow
3
Junior Poster
abelingaw
69
Posting Whiz in Training
Shodow
3
Junior Poster
abelingaw
69
Posting Whiz in Training
Shodow
3
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.