dlookup on forms

  • Follow


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

0
Reply Utf 2/26/2008 2:38:01 AM

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

-- 
Steve Schapel, Microsoft Access MVP

umpire_43 wrote:
> 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
> 
0
Reply Steve 2/26/2008 7:05:05 AM


1 Replies
209 Views

(page loaded in 0.037 seconds)

Similiar Articles:
















7/25/2012 9:15:58 PM


Reply: