Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have just started working on MS Access 2007. I know how to create a form and add buttons, textboxes, etc

I don't know how to connect my values entered in textbox to my table in database.

How do I save a new record?

I know the query, which is;

INSERT INTO table_name VALUES (txtUser, txtEmail);

I just want my "Save" button to execute the above query.

First of all, is my query correct? Is this the right way of connecting textbox values so as to save in my table?

share|improve this question
    
Make a google search you can easily get the answer –  Biju jose Oct 20 '12 at 12:56
    
you might want to look into binding you data to the form - then everything is automatic. look at the "recordset" property for the form. –  Max Vernon Oct 20 '12 at 14:25
1  
@MaxVernon I finally got it! I selected my table and clicked "Create Form." Then I kept my button in my form using the wizard. Then I edited it's macro. And it worked! I never had to run a query after all. I'm really bad in database, I never knew I could insert a new record without even coding! Please excuse my beginner's types of questions. I would appreciate if beginners like myself are encouraged. Thanks. –  deepz Oct 20 '12 at 15:58
    
thanks for commenting with your solution–don't be discouraged when we close basic questions, but do come back with advanced questions :) –  Jack Douglas Oct 22 '12 at 8:48
2  
@JackDouglas okay I will take it positively and hopefully come back with advanced questions; like you said. –  deepz Oct 22 '12 at 10:17
add comment

closed as off topic by RolandoMySQLDBA, Jack Douglas Oct 22 '12 at 8:48

Questions on Database Administrators Stack Exchange are expected to relate to database administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.