Linking (binding?) a form to more than one table?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have a form, and I'd like to be able to have it display/update data
from/to fields that are on different tables.
I have a table that holds customer information and domain names and another
table that holds registrar information (phone, web site, email, etc).
What I'd like is, when someone is inputting a new domain they fill out all
of the information, including the registrar field. Then:

if the registrar is already in the registrar table, it populates the phone,
web & email fields on the form from that table.
if the registrar isn't already there, then it adds the registrar and the
info to the registrar table from the form.

The problem I'm having is that I keep getting a #Name? error. My assumption
is because the form is already bound to the customer table, it doesn't
recognize the field names from the registrar table. I've tried manually
entering them and using expression builder, and no luck. Is what I'm trying
to do possible? Did I describe it clearly enough?

If anyone has any ideas or questions, please let me know.

Thanks to all for the help.
 
You need to use a query as the record source for your form. In the query add
the tables and join them on the registrar field.
The type of join will be based on the relations between the two tables.
Which comes first - the chicken or the egg (customer or registrar)? It seems
like the registrar should be like Parent and therefore hold the primary key.
But then you could not do <<then it adds the registrar and the info to the
registrar table from the form>> as you suggest.

You will need to do some reading on relationships.

You could have a non-linked subform just to display/enter new registrar data.
 
Back
Top