Adding TextBox data to a table

LB79

Registered User.
Local time
Today, 20:03
Joined
Oct 26, 2007
Messages
505
Hello,

I have a form with textboxes that a user can type information to. I want to create a procedure that then takes that text and inserts it into an existing table.
Does anyone know a way of doing this?

Thanks
 
Are you looking to append the txtbx information to a certain field in the table that is already contained within an existing record, or are you looking to create a new record with this information?

The methods that come to mind for something like this...

* Set the recordsource of the form to the table, and set the txtbx controlsource to the field.

* Db.Execute method.

* DoCmd.RunSql method.
 
If you base your form on a table (actually a query if best) then have the control source of the test boxes as fields in the underyling query/table it will do it for you. That is the beauty of Access there is not need to write procedure to that for you.

The form wizard will do ll this for you.
 
Thanks for the advice... Im still new with Access so please bear with me...
When I link the form to the table (tried query too), it just populates my textboxes with the data in the first row of my table. How can I make it so the TextBoxes are blank and the when data is added it is entered in the table?

ta
 
okay... Ive done that and now my textboxes are blank... but when I type the data nothing goes into the table... is there a button i should be creating or am i missing something else?

Thanks guys!
 
After inserting data into the text boxes move to the next new record. That will save the data to the table(s). If that doesn't work post you MDB here for us to look at.
 
Ahh! that works now! Do you know what the vb code would be for selecting the next record?

thanks!
 
DoCmd.GoToRecord "acnext"

In a data entry form though, all you need to do is save the form to start a new record...

DoCmd.Save
 

Users who are viewing this thread

Back
Top Bottom