943,617 Members | Top Members by Rank

Ad:
Aug 2nd, 2005
0

add record in table with button and textbox

Expand Post »
hi,

i have soms big troubles.
can anyone help me?

i have to make a database in access. Now for some functions i need to use vb in forms i made. What is now the problem?

Well, i want to add text to a table by writing my text in a textbox and then push on a button (button and textbox are located in the form), automatically the text disappears and when you open the table in which one you wanted to add the new record, the text is added as a new record.
has anyone a solution for the problem

many thanks

greetz
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
feeder23 is offline Offline
1 posts
since Aug 2005
Aug 4th, 2005
0

Re: add record in table with button and textbox

hi feeder23

ok here is a help from me and i hope this one will help you...but make sure you have your ADO control already with valid connections and everything.



private sub command1_click

with adodc1.recordset

.addnew
.fields("fieldname") = text1.text
text1.text = ""
.update

end with

end sub


i think its done...well just reply if things didnt work out. have a nice day!
Reputation Points: 11
Solved Threads: 0
Light Poster
vhinehds is offline Offline
29 posts
since May 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: VB6 & Adobe Pagemaker
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Opening HTML file from Program





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC