add record in table with button and textbox

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2005
Posts: 1
Reputation: feeder23 is an unknown quantity at this point 
Solved Threads: 0
feeder23 feeder23 is offline Offline
Newbie Poster

add record in table with button and textbox

 
0
  #1
Aug 2nd, 2005
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
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 29
Reputation: vhinehds is an unknown quantity at this point 
Solved Threads: 0
vhinehds's Avatar
vhinehds vhinehds is offline Offline
Light Poster

Re: add record in table with button and textbox

 
0
  #2
Aug 4th, 2005
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!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC