Insert text box text into table

tomy76

New member
Local time
Yesterday, 22:30
Joined
Oct 17, 2010
Messages
2
I have been searching for a code to run from command button to insert three text box input into a table in ms access 2007.I have created a table name table1 with three field date ,name and amount .i have found codes in tutorial sites but i cannt get it to work.can someone help me with a simple code to do it please
 
Welcome to the forum :)

Just wondering why you don't want to have the form bound to that table? When the form is bound to that table your record will be saved automatically. If you didn't know that and now want to give it a go then simply use the Form Wizard, select your form and fields and you're ready to go.

You can even set your bound form to be just for Data Entry as well.
 
thank you .all i need to do is inserting text box input into the table,i will try this way, if i cannt do it i will post again .thank you again
 
I expect you will be back because text boxes cannot be inserted into tables.
Perhaps you are wanting to put a lookup on a field in a table?
 
tomy,

Code:
CurrentDb.Execute "Insert Into YourTable (SomeField) " & _
                  "Values ('" & Me.txtYourTextBox & "')"

Wayne
 

Users who are viewing this thread

Back
Top Bottom