Filling a table using combobox on a Form

dudezzz

Registered User.
Local time
Today, 16:45
Joined
Feb 17, 2005
Messages
66
I have a basic design question that I am not sure how to address.

I am trying to build a simple data entry database with a form to take input from the user, store the values in a table. Once the data is gathered into the table I want to use this table to print a report of each record (entered using the form before).

To achieve this objective, I made a form (frminput) with some text fields. Most of the fields on this form are Bound fields to a query (qrymaster). One of the field is a Combo box (whose value is shown from another table). I have designed the RecordSource of this Form to be a Query (qrymaster).

This is a basic Data Entry form where the user selects the Combo box item and based on what he selects, some of the fields in this Form gets pre-filled. The rest of the fields on this form are bound to the query "qrymaster" and the user has to type these fields manually.

Now, I want a Save button here that would save all the values on this form to the table "tblmaster". How do I do this efficiently keeping in mind all the normalization laws on the database?

At this time, behind the Save Button, I have included a SQL statement to insert all the field values into the table "tblmaster".

I am sure there is a better way to do this. Can someone point me in the right direction please?

Thanks.
 
If the form is bound to your table(s) and all is working as it should, Access does the saving for you automatically. If you want to force Access to save the current record on a button click, one line of code does it (with bound forms).

DoCmd.RunCommand acCmdSaveRecord

Regards,
Tim
 
My problem comes from using Combo box. The rest of my form fields are bound to the query except my combo box (which is unbound).

How will this Save button save the value the user selected on the combo box to my table if its not unbound?
 
We need a bit more information. Why can't you bind the combo box to the field?

Regards,
Tim
 

Users who are viewing this thread

Back
Top Bottom