All data entered on a form to a table

cybhunter

Registered User.
Local time
Today, 14:02
Joined
Sep 11, 2007
Messages
17
I have a form with several tabs on it, where the user enters various info.. I want to have the user hit the save button and have all info saved to a single table. Is there an easy way to do this. Please excuse my ignorance but I am fairly new to Access. Thanks in advance!
 
So you don't want the form to show current records in the table? Just add new records?
 
Ideally I would like to do both.
 
Ideally I would like to do both.

Then just bind the form to the table. You won't need a save button as access will save records automatically.

Then you can view, update, and add new records...this is what forms are for.
 
so..... I have the form already built. Now I create a new table at this point and then bind the form to it how? Do I have to manually create all the columns in the table or will access do that for me? Sorry, told you I was new to this. :) I am looking on the net for help to bind the form to a table too. Thanks!
 
Yes you need to design your table first, then link your form to it. In the form's properties, set the record source to the table you created. Then you need to have each item on your form's control source set to each field in the table.

The easiest way for you is probably create your table, then use a form wizard to create your form, then modify the form to how you want.

I suggest getting a book on Access databases and doing some reading so that you can get some of the basics down.
 
The form I am refering to is not a simple form. It is actually an job estimating tool with a ton of VBA behind it that does calculations etc. In reality it is an application on it's own. The user enters info into the tabbed form and then various actions are performed as the user clicks buttons. So re-doing the form is not a possibility. What I am looking for is capturing all the user inputs and any calculated field values and storing them to a table for retrival. I just wasn't sure if I had to manually enter every single field (100 or so fields) into a table to get this done or if a table could be created automagically putting all the form fields into a table. Guess the answer is I have to build the table manully the bind it. correct?
 
The form I am refering to is not a simple form. It is actually an job estimating tool with a ton of VBA behind it that does calculations etc. In reality it is an application on it's own. The user enters info into the tabbed form and then various actions are performed as the user clicks buttons. So re-doing the form is not a possibility. What I am looking for is capturing all the user inputs and any calculated field values and storing them to a table for retrival. I just wasn't sure if I had to manually enter every single field (100 or so fields) into a table to get this done or if a table could be created automagically putting all the form fields into a table. Guess the answer is I have to build the table manully the bind it. correct?

You could create a table using the form, but still it could be some work. It depends on what all you want to be added to the table.

You could use a For...Next loop:

For Each Control, check to see if it's a text box, or whatever, and if so, copy the value or control name to an array, then create a table from that array, etc. Once the table is created it should be easy enough to build a SQL statement to update the table, or link the form to the newly created table. But you would have to set each control source of each control on the form to the proper field in the table - and then depending on what's going on with your VBA code that may or may not cause issues doing this.

I thought you were just trying to make a new form to put data in a table.
 
sorry I wasn't very clear on my first post. In a nutshell, this tool (form) was created to do estimates for engineers. It was NOT designed to save the estimates. Now they want to save estimates. So now I am trying to back track. I guess there is no simple solution, it is just going to take a lot of time to manually set up the table and link all the field(s) data. Then I'll have to design a process to retrieve the records they wat to retrieve. UGGG
 
sorry I wasn't very clear on my first post. In a nutshell, this tool (form) was created to do estimates for engineers. It was NOT designed to save the estimates. Now they want to save estimates. So now I am trying to back track. I guess there is no simple solution, it is just going to take a lot of time to manually set up the table and link all the field(s) data. Then I'll have to design a process to retrieve the records they wat to retrieve. UGGG

Well yeah it can take some time.

Create a field for say an account number so they can retrieve estimates by that. They will need to have some unique identifier that they enter otherwise finding estimates will be nuts.

Sorry if I sounded condescending earlier but I didn't know you had already done all this and thought you were just trying to make a new form to link to a table.

Usually when I design stuff, I design things that users may not ask for, but make sense to me - then inevitably down the road they will want it and if I hadn't put it in in the first place it would be more work than doing it along with other things initially, like you have here.

The only thing that I can think of to make it easier is that for..next loop to get the names of all your controls and use those to create a table with the values, but you still have to define data types and any restrictions/validation...so still that probably wouldn't cut down on work too much.
 

Users who are viewing this thread

Back
Top Bottom