add field to form from different table

D

deb

I have a form - record source is t0103Issue.(see below for fields)
I would like to add a text box with a field (LevelorAdj) from a different
table(see below for LevelorAdj)

Textbox is named LJ

table t013IssueDesc (add LevelorAdj to form)
IssueDescID
IssueDesc
LevelorAdj

table t0103Issue (for form)
IssueID
RiskID
IssueDescID

How is this done?
 
U

UpRider

Deb, in the form's current event, add:
LJ=dlookup("LevelorAdj","t013IssueDesc","IssueDescID = " & [IssueDescID])

UpRider
 
J

Jerry Whittle

First thing is to open the Relationship window and make sure that the two
tables involved are joined there probably by the IssueDescID. If not, you
want them joined and, ideally, with referiential integrity enabled.

Then you COULD create a query that joins these two tables and use it as the
record source for the form. However this often creates problems where you
can't add or edit records in either table.

Instead of a textbox named LJ, consider creating a subform on the form. With
the relationship defined in the Relationship window, the subform Wizard
should make the process pretty painless.
 
Top