Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2005

Tip: Looking for answers? Try searching our database.

DLookup Help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AndyEduardo - 29 Nov 2005 21:47 GMT
I want to say thanks to Allen Browne for his help...

The problem now is as follow....

I have one Form (Invoice) with one subform (Invoice's Details), when
select one client in the cbo of the form, the subform's cbo shows onl
the products by agreement.....

Later, I used DLookup function (as Allen Browne recommended)
DLookup(expression, domain, [criteria]), but I need to use tw
criterias.....I understanded the terms -expression- and - domain-, an
they work good, but when I select the product I need two criteria
because two differents clients can to buy the same product wit
different price.
then I did a querie with needed fields, and I said to criteria of th
DLookup  function [criteria1] and [criteria2], then Access said (I
Spanish, sorry)  Error 13 No Coinciden los tipos.....

Help me Pleas

--
AndyEduard
mscertified - 29 Nov 2005 22:46 GMT
I dont understand Spanish but the only error I could think of is that a
column name you specified is not in the table you are searching.
Check the syntax of your criteria clause. Are you sure you have the quotes
and brackets in the right place? The [] is supposed to be around table names
or column names not the entire criteria clause.

Dorian

> I want to say thanks to Allen Browne for his help...
>
[quoted text clipped - 15 lines]
>
> Help me Please
John Vinson - 29 Nov 2005 23:20 GMT
>I want to say thanks to Allen Browne for his help...
>
[quoted text clipped - 15 lines]
>
>Help me Please

You can only use one criterion - but that criterion can contain
multiple expressions. It should be a valid SQL WHERE clause without
the word WHERE, and it can contain AND (if you want both of two
criteria to apply) or OR (if you want to look up the value if either
one of the criteria applies). For instance you could use

=DLookUp("[Price]", "[PriceList]", "[CustomerID] = " & [CustomerID] &
" AND [ProductID] = " & [ProductID])

This will produce a single string value such as

[CustomerID] = 319 AND ProductID = 44

when the values in the form are inserted.

I have no idea what your table looks like or what criteria you are
trying to use so I can't give a better example. Post with a
description if you need help.

                 John W. Vinson[MVP]    
AndyEduardo - 30 Nov 2005 17:39 GMT
Thanks to John, I tried as you said and Access did it

Thank you very much for your help. I'm satisfied with your answe

--
AndyEduard
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.