Adding a field from another form after it was created

G

Guest

I have 3 table that are linked in this order:

Loan info (main),
Collateral - linked to Loan Info (1 to many, loan info is the 1 and this is
the many)
Real Estate FS - linked to Collateral (1 to many, Collateral is the 1 and
this is the many)

In the Real Estate FS form, I need to pull in the loan payment from the Loan
Info table for a computation in the Real Estate FS form. In design view, I
try to add the field, I get a ?name error. The loan info field were not
included in the field selected when the form was created.

How do I add a field from another table without redoing the form entirely.
 
J

John Vinson

I have 3 table that are linked in this order:

Loan info (main),
Collateral - linked to Loan Info (1 to many, loan info is the 1 and this is
the many)
Real Estate FS - linked to Collateral (1 to many, Collateral is the 1 and
this is the many)

In the Real Estate FS form, I need to pull in the loan payment from the Loan
Info table for a computation in the Real Estate FS form. In design view, I
try to add the field, I get a ?name error. The loan info field were not
included in the field selected when the form was created.

How do I add a field from another table without redoing the form entirely.

Are these three separate *forms*? or two Subforms on a main form?

To display (but not edit) data from another table, you can set the
Control Source of a textbox to

=DLookUp("[fieldname]", "[Loan Info]", "[LoanNumber] = '" &
[LoanNumber] & "'")

assuming fieldnames and that the LoanNumber is a text field.

John W. Vinson[MVP]
 
G

Guest

Loan info is the main form, and collateral is the sub form, and real estate
FS is a sub form to Collateral.

I will try your suggestion.

Kelvin

John Vinson said:
I have 3 table that are linked in this order:

Loan info (main),
Collateral - linked to Loan Info (1 to many, loan info is the 1 and this is
the many)
Real Estate FS - linked to Collateral (1 to many, Collateral is the 1 and
this is the many)

In the Real Estate FS form, I need to pull in the loan payment from the Loan
Info table for a computation in the Real Estate FS form. In design view, I
try to add the field, I get a ?name error. The loan info field were not
included in the field selected when the form was created.

How do I add a field from another table without redoing the form entirely.

Are these three separate *forms*? or two Subforms on a main form?

To display (but not edit) data from another table, you can set the
Control Source of a textbox to

=DLookUp("[fieldname]", "[Loan Info]", "[LoanNumber] = '" &
[LoanNumber] & "'")

assuming fieldnames and that the LoanNumber is a text field.

John W. Vinson[MVP]
 
J

John Vinson

Loan info is the main form, and collateral is the sub form, and real estate
FS is a sub form to Collateral.

If there's a textbox named txtPayment (which need not be visible) on
the mainform bound to the Payment field, you can use either

=Formname!txtPayment

or

=Parent!Parent!txtPayment


John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top