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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Have Information automatically fill in

Status
Not open for further replies.

mommom

Technical User
Nov 14, 2003
208
0
0
US
When I am incorporating data in form if the same information is on a previous record I would like it to automatically fill in the appropriate spaces.
 
Not sure what you mean. Can you explain in more detail what you want to do and may be provide some code so we could help?
 
For an example: I have name, phone number, job title. That person may have already been listed on a previous form. When typing up new information, I may need to add the same person and their information in that part of the form. Instead of typing the information over, when I type their name I would like the rest of the information to automatically fill in. Hopefully you can understand my explanation. Any help would be appreciated.
 
Are the data of this person posted in the database by the "previous form"? if so, you can query the database at the LOSTFOCUS event of the control which holds the primary key, retrieve the rest of the information and append it to the appropriate controls. If the data aren't in the database, you can persist them in a public array and again query the array for the information you want. As can be seen, I am only speculating here since you haven't provided enough information of your app. When you identify your situation I might be able to provide some code as well.
 
if you're openning up an additional form from the main form you can connect an index (from the main table) to a number field (in the sub table)

Called a parent to child relationship...Access 101.

then if you place the fields from the main table in the query of sub table, the main information will show up in the sub form.

i know that may seem confusing but basically you're just using the power of a relational database?

j
 
Sorry about being so confusing. It's pulling information from the table and having it automatically pull into the form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top