Solved

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

Posted on 2011-03-23
3
337 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Veeam gives away 10 full conference passes

Veeam is a VMworld 2017 US & Europe Platinum Sponsor. Enter the raffle to get the full conference pass. Pass includes the admission to all general and breakout sessions, VMware Hands-On Labs, Solutions Exchange, exclusive giveaways and the great VMworld Customer Appreciation Part

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

635 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