Unanswered: A97: Populating a form with data from another table
Here's a simple problem but I'm stumped.
I am populating the fields on a "Past Presidents" form with name and address data. Some of the data is that of names of deceased members for which no information in other tables exists. Thus, I am forced to enter the information manually.
I wish to look up the member name with a combo box bound to a member table or query and, if the name is found, copy the record to the fields on my form. If the data is not found then display a message directing me to enter the data manually. I recognize this as a "flat-file" operation but I cannot edit the parent table of my form.
My approach is to create a recordset, find the desired record then copy the data in that record to the appropriate fields on the form.
If this is a viable approach, my problem is that I am very weak on coding with recordsets. I don't understand them enough to carry out the operation. Maybe there is an easier way.
Originally posted by jmonroe
If you post your table layout in a post, I can probably show you how to do what you are needing to do. I want to make sure I am understanding totally what it is you need.
Here are the structures of the two tables, a query and the form I use with supporting data.
From the "Past Presidents" form, I wish to select a member from the combo box. If the member is not in the supporting combo then I must enter the data manually.
I cannot modify the members/qryMembers table because I pick if up from our society headquarters periodically. It contains about 2300 names and to modify the table would require a change each time it is downloaded.
It seems to me that to do what I want to do, may require creating a recordset and assigning the appropriate parts of the reecord, in the recordset, to variables on the past presidents form. Thus, I copy the members record to the underlying form table. Therein lies the problem: I don't understand recordsets well.