Ms.Access: copy data from listbox

Anonymous
2017-05-20T18:45:57+00:00

Hey guys, I have a list box that contains few details found in another Table i.e Member ID. This list box is found in another form with almost similar fields as the previous one.. I want it in such a way that if I click on the ID in the list, the details are automatically copied to that form..

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. ScottGem 68,780 Reputation points Volunteer Moderator
    2017-05-20T20:00:15+00:00

    That's NOT how relational databases work. See my blog on Displaying Data from Related Tables.

    0 comments No comments
  2. Tom van Stiphout 40,096 Reputation points MVP Volunteer Moderator
    2017-05-21T00:14:57+00:00

    > another form with almost similar fields as the previous one

    And this other form is bound to a table with almost similar fields as the previous one?

    If yes you will have to explain more; this is almost certainly a severe database design error that we would have to tackle first.

    0 comments No comments
  3. Anonymous
    2017-05-21T08:59:23+00:00

    > another form with almost similar fields as the previous one

    And this other form is bound to a table with almost similar fields as the previous one?

    If yes you will have to explain more; this is almost certainly a severe database design error that we would have to tackle first.

    one table holds records for amount of money contributed, and the other works like where the loans are issued. So what am talking about is this..the current form is the one belonging to the loans.but I need to be able to extract information about members from the form where they make contributions

    0 comments No comments
  4. ScottGem 68,780 Reputation points Volunteer Moderator
    2017-05-21T11:43:37+00:00

    Again, that is NOT how relational databases work. One of the main principles is to eliminate redundant data. Data should exist in ONE place only. You should have a table of member. The only item of data about a member, that exists in either the contributions or loans tables is the MemberID as a foreign key.

    What you want to do is DISPLAY the member info on the form. My blog article gives you details about several ways to handle this.

    1 person found this answer helpful.
    0 comments No comments
  5. Anonymous
    2017-05-21T14:15:41+00:00

    Once you have eliminated the redundancy from the referencing table on which the form is based, you simply need to base the form on a query which joins the referencing table to the members table on MemberID.  The controls in the form which are currently bound to the redundant non-key columns in the referencing table can then be bound to the equivalent non-key columns in the referenced members table.  The Enabled property of these control should be set to False (No), and their Locked property to True (Yes) to make them read-only.  The list box should be bound to the foreign key MemberID column in the referencing table.

    2 people found this answer helpful.
    0 comments No comments