Output Date From Form into a Table?

brian0721

Registered User.
Local time
Today, 00:17
Joined
Dec 5, 2001
Messages
103
Output Data From Form into a Table?

I have a table that I am going to be storing employee info in. I want the user to be able to enter the information in a form, and then click a button to output it to the form where it is stored. I have 2 combo boxes and 3 text boxes that contain this information. How would I go about doing this?

Thanks alot!
 
Last edited:
and then click a button to output it to the form where it is stored
- Forms don't store data. Tables store data. If you specify a query (preferably) or a table as the RecordSource for a form and then choose fields from that RecordSource for each ControlSource, the form is "bound" and Access will take care of populating the bound fields and saving them if they are changed. You don't need to write any code.
 
Pat Hartman said:
- Forms don't store data. Tables store data. If you specify a query (preferably) or a table as the RecordSource for a form and then choose fields from that RecordSource for each ControlSource, the form is "bound" and Access will take care of populating the bound fields and saving them if they are changed. You don't need to write any code.

I meant to say output to the Table where it is stored. I have combo boxes on the form, so can I bound it to the table straight?
 
I would use a query because it is better practice. But, it is possible to use a table as long as you have no sorting requirements or lookup fields and your tables are Jet rather than ODBC.
 
How would I go it? I'm not sure if it's code I have to use or what? But when I click the button, I want the data to be transfered to the table, or if you think its easier, then to a Query.
 
You don't need to write any code. Just create a query that retrieves the data needed to populate the form and save it. Change the RecordSource of the form to be the name of the new quey rather than the name of a table. Your form is now bound. The navigation buttons will let you scroll through the recordset. If you modify any control value, Access will save it when you close the form or scroll to a different record. You don't have to "do" anything!
 
I do and I do not see what you are saying. The way you said it, I interpret it to be that the user can scroll through the records on the form that they input the data to. This is not what I want. Ultimately a report will be generated that will produce all the information and total the amount for each employee. I just want to use the form to load the information because it looks nicer and I can use the combo box.

You definitely know alot more then I do, if there is an easier way, please let me know. I am still confused!

Thanks!
 
Then set the form's DataEntry property to Yes. That will limit the form to data entry. Alternatively, you can open the form with OpenForm and one of the arguments will let you open the form for data entry.
 

Users who are viewing this thread

Back
Top Bottom