Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Input Row of Data into Subform?

Status
Not open for further replies.

frosty2000

Technical User
Feb 5, 2005
18
US
Hello!

I am new to Access and have little programming knowledge, so any help you can provide would be much appreciated!

I am creating an employee database to track employee demographics and their dependents' demographics (i.e. name, Soc Sec #, birthdate, etc). I have a main form ("Employee Demographics") to input all of the employee data, and I have a subform in datasheet view("Dependent Demographics") to input all of the dependent data. The two are linked by the Employee Soc Sec #.

However, because of the way I need to set up the queries to provide data to our outside vendors, the employee demographics must also be entered into the subform. (i.e. an employee's birthdate, name, etc must appear in both the form and the subform). I am looking for a way to auto populate the first row of the subform with the employee's demographics that the user inputs at the top of the main form.

Any ideas? I have tried linking an Append Query to a command button, but I am a little nervous about using that and don't want the user to have to click a button to populate the subform. I have also looked into the AutoLookup Query, but since only the employee's data is in the main form, I'm guessing I would get some type of error message for the dependents.

In an idea situation, I would like the subform to automatically populate each field as I'm typing the employee demographics into the main form. Then, when I get to the bottom of the form, the subform would already include all employee demographics, and I would click on the next row to input the dependent demographics. Not sure if this is possible?

Thanks for your help!
frosty2000
 
you need to look at data normalization. You would not want to duplicate the data on the subform. You would instead want a query that would bring the 2 together. Of course I am assuming that you have 1 table for primary and 1 table for 2ndaries. Just look up 3rd normal form, or table normalization.

This is a link to another forum, but the person who posted this is awesome. Take a moment to read this and look through it, and you will understand how to get your tables set up. Then you just use a query to view the data put together. You don't need to see it 2x on a form, but you can export a query of data, or a report, showing everything you need.


misscrf

It is never too late to become what you could have been ~ George Eliot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top