|
-
Oct 30th, 2008, 01:26 PM
#1
Thread Starter
New Member
using ms acces with use in forms in add, delete, exit, update data record
hi
how r u?
i have a question like when i use ms access with making database in a table and use a forms and in a forms i want to add command button like add, update, delete, exit
so give me reply
as soon as possible
thank u
-
Oct 30th, 2008, 01:27 PM
#2
Re: using ms acces with use in forms in add, delete, exit, update data record
So what is the question..... You can do all that no problem
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Oct 31st, 2008, 08:03 AM
#3
Re: using ms acces with use in forms in add, delete, exit, update data record
Hi rajdip82, welcome to the forums!
I have a link in my signature on adding records to Access database, have a look...
-
Oct 31st, 2008, 11:12 AM
#4
Hyperactive Member
Re: using ms acces with use in forms in add, delete, exit, update data record
hello
I do believe that you want to know how to add buttons onto your Access forms.
1. Open your form in design view.
2. Select a button from to control box.
3. Place the button onto your form.
4. Follow the instructions relating to what you want it to do.
Record Operations for Add, Delete, Update.
Kind regards
Steve
-
Oct 31st, 2008, 12:07 PM
#5
Re: using ms acces with use in forms in add, delete, exit, update data record
Moved to Office Development
 Originally Posted by GaryMazzone
So what is the question
What is the answer to Gary's question?
-
Oct 31st, 2008, 01:26 PM
#6
Fanatic Member
Re: using ms acces with use in forms in add, delete, exit, update data record
Hello,
You can able to add,edit,update and delete records using ADODB. Project->Components->Microsoft ADO Data Control 6.0 (OLEDB)
Add that to the form
Now put 4 buttons as Add,Delete,Edit,Update
coding:
dim db as new ADODB.Connection
dim rs as new ADODB.recordset
private sub form_load()
db.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\Final Full\EXE\horse.mdb;Persist Security Info=False"
Bold contents must be your database path
rs.open "Select * from details",db,3,2
This bold contents must be your recorset name where to add the datas.
end sub
Private sub add_click()
rs.addnew
rs.fields(0) = text1.text
rs.fields(1) = text2.text
etc
rs.update
msgbox "Data Added"
End sub
If my post was helpful pls rate me
-
Oct 31st, 2008, 01:29 PM
#7
Re: using ms acces with use in forms in add, delete, exit, update data record
You should not be opening a recordset just to add records. You issue an Insert SQL statement on a connection object command property
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Nov 1st, 2008, 02:59 AM
#8
Re: using ms acces with use in forms in add, delete, exit, update data record
 Originally Posted by bharanidharanit
Hello,
You can able to add,edit,update and delete records using ADODB. Project->Components->Microsoft ADO Data Control 6.0 (OLEDB)
Add that to the form
Now put 4 buttons as Add,Delete,Edit,Update
coding:
dim db as new ADODB.Connection
dim rs as new ADODB.recordset
private sub form_load()
db.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\Final Full\EXE\horse.mdb;Persist Security Info=False"
Bold contents must be your database path
rs.open "Select * from details",db,3,2
This bold contents must be your recorset name where to add the datas.
end sub
Private sub add_click()
rs.addnew
rs.fields(0) = text1.text
rs.fields(1) = text2.text
etc
rs.update
msgbox "Data Added"
End sub
If my post was helpful pls rate me
Using data bound controls for DML are frowned upon since they are considered evil.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|