Solved

DLoopkup function on MS/Access 2010 yels ?name or #error

Posted on 2011-03-23
3
331 Views
Last Modified: 2013-11-28
I a just starting to use ms/access 2010 and have a small db wuth 3 tables: [beneficiario], [ordempagamento] and [projetos].

I am trying to build a form for [ordempagamento] that, from an input code (a name) would retrieve an address from [beneficiario].

So I am using the following sysntax:

= Dlookup ("Morada";"Beneficiarios";"Nome =" & [FormNomeBeneficiario])

It would not work, yelding #error as a return

also tried:

=DLookUp([Beneficiarios].[Morada];[Beneficiarios];[Beneficiarios].[Nome]=[NomeBeneficiario])

and

= Dlookup ("[Morada]";"[Beneficiarios]";"[Nome] =" & [FormNomeBeneficiario])

could nor pit to work

I am attachiing the database

can anyone help? formulariosFEDON.accdb
0
Comment
Question by:jirdeaid
  • 2
3 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 35200653
The lookup should be..

=DLookUp("[Morada]","[beneficiarios]","[Nome]='" & [formNomeBeneficiario] & "'")

Ypu also need to add a command into the FormNomeBeneficiario combo box afterupdate event procedure..

me.text49.requery
0
 

Author Comment

by:jirdeaid
ID: 35200887
THANKS!!!! it worked!
0
 

Author Closing Comment

by:jirdeaid
ID: 35200908
perfect!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now