Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    7

    Unanswered: A97: Populating a form with data from another table

    All:

    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.

    Any help will be appreciated.

    Ron

  2. #2
    Join Date
    Dec 2002
    Posts
    117

    Table Layout

    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.

  3. #3
    Join Date
    Jan 2004
    Posts
    7

    Re: Table Layout

    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.
    Jeremy:

    Here are the structures of the two tables, a query and the form I use with supporting data.

    The obect:

    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.

    Let me know if you need more info.

    Ron

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •