How to populate a form/table from another table?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Scott Martinek
    New Member
    • Jan 2011
    • 2

    #1

    How to populate a form/table from another table?

    I created a form (Base_Data_Form ) that updates a table (Base_Data) and I created a combo box to populate the account number from a different table (0004_All_Accou nts) when the account number is selected.

    The account number goes in the form and the table when selected from the combo box with no problem. There are about 10 other fields in table 0004_All_Accoun ts that I would like updated in the Base_Data_Form and Base_Data table when the account number is selected, but I can't get it to work. I have tried using various events (Before Update, After Update, On Enter, On Exit, etc.), but I get an error message...

    *** The expression on enter you entered as the event property setting produced the following error: The object doesn't contain the automation object*** every time.

    I have also tried linking the fields, linking the tables, and using Lookup Tables, but I'm just not getting it.

    I'm not against using Visual Basic, but I don't know it well enough to get through it on my own. I see where people use Me. in VB, but I have no idea what that means. This is not my first database, but it's the first DB I've created in several years so I'm a bit rusty and I would appreciate any help.

    Thanks
  • RuralGuy
    Recognized Expert Contributor
    • Oct 2006
    • 375

    #2
    All you need in the Base_Data table is the PrimaryKey field from the 0004_All_Accoun ts table as a ForeignKey and all of the fields in both tables are available with a query and a join as if in one table.

    Comment

    Working...