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
 

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

Similar Threads

Dlookup Sum 2
Dlookup 2
dlookup challanges 1
DLookUp and Continuous forms 3
Adding data from a table to a subform with DLookup 1
Dlookup, one more time 2
dlookup 1
DLookUp 4

Top