dlookup on forms

U

umpire_43

Hi...

I'm hoping someone can help me.

I'm working with a form in access. (form name is frmvcletter)

I have a bound text box on the form called txtPlan_1.
I have a bound text box on the form called txtPlan_2

Table 1 has: Basis 1 Code, Basis 2 code
Table 2 has: Code, Description

Instead of putting the basis 1 code information in the text box (txtPlan_1),
I want to retrieve Description from Table 2 when Basis 1 code match Code.
Apply the results to txtPlan_1

I want to use dlookup.

Please help!!!!

thanks
 
S

Steve Schapel

Umpire,

What you are asking is not possible.

You could do this with *unbound* textboxes on the form, which referenced
the value of the bound txtPlan_1 and txtPlan_2 controls. The Control
Source of one of these unbound textboxes would be something like this:
=DLookup("[Description]","Table 2","
Code:
='" & [txtPlan1] & "'")

You may find this article relevant:
http://accesstips.datamanagementsolutions.biz/lookup.htm
 
Top