Solved

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

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

679 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