Solved

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

Posted on 2011-03-23
3
335 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

752 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