954,174 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

add record in table with button and textbox

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

feeder23
Newbie Poster
1 post since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

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!

vhinehds
Light Poster
29 posts since May 2005
Reputation Points: 11
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You