Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making a button insert form data to a table when clicked.

Status
Not open for further replies.

sknyppy

Programmer
May 14, 1999
137
0
0
US
I have never used a command button before and I'm not really sure how to begin. I have a form with various textboxes/dropdown boxes and I'm trying to insert the data into the table when I click the button. I believe I need to us an event procedure but I don't know how to write one.

Thanks for any assistance...

~Dave
 
I do not mean this smart, but the help file and loads of internet resources will supply the sql necessary. If you know how to select data with ADODB recordsets, then you can insert. However, to answer your question, build the button without the wizard and then pull up its properties. You will see an event tab. There is an On Click event. When you click in there you will see a ... to the side. Click this and select "code builder." You are now inside the VBA module builder. From here you either need to see a tutorial or read the help file, because it is too much for one email. I hope this was not taken harshly. What it appears you are asking is how to wrote VB and VBA procedures.
 
g'day...just using the control toolbox, create a button, use the wizard and select 'new record' action - is this what you're after?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top