Re: DLookUp in a Query

Tech-Archive recommends: Fix windows errors by optimizing your registry



Post the full SQL statements of the QUERY2 and QUERY1.

--

Ken Snell
<MS ACCESS MVP>


"Martin" <Martin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A6748A75-FDB4-459E-B8CE-E626617A463D@xxxxxxxxxxxxxxxx
I am getting a #Error message in the AMOD field of my query QUERY1:

AMOD: iif(IsNull([MSIZE]),"N/A",DLookUp("MOD","QUERY2","MODID= " &
[MSIZE]))

MSIZE is a lngInt field located in 'Query1'. Sometimes it has a Null
value.

MOD is the value I want to retrieve from QUERY2.
MOD is a field that has the expression MOD:[WIDTH] & " ft x " & [LENGTH] &
"
ft"

However, if I substitute MOD with WIDTH in the DLookUp, it works. But I
need
to have the text result instead of a number.

Any ideas why this doesn't work?



.



Relevant Pages

  • RE: loop though records in a query?
    ... do a crosstab query on these records ... Next (next record in query2) ... I have a query called query1. ... I also have query2 which is a list of unique records in query1 based on ...
    (microsoft.public.access.queries)
  • RE: loop though records in a query?
    ... For each group of records in query1 that are related to the record in query2: ... I have created the query with the joins like you suggested. ... Unionthe crosstab to a master crosstab query ...
    (microsoft.public.access.queries)
  • Re: SubQuery or SubReport??
    ... when running the report. ... Since you join on GPP, not on CompanyName, query3 should be: ... SELECT query3.gpp, query1.*, query2.* ...
    (microsoft.public.access.queries)
  • Re: How do you pass parameters between queries in Microso
    ... It sounds like you might have one query that depends on the ... and two queries (QUERY1, QUERY2). ... user retrieves formatted records within a particular date range by ... QUERY1 references the text boxes in FORM1 where a data range is entered. ...
    (microsoft.public.access.queries)
  • Re: Using UNION with three queries
    ... Obviously, none of these is a complete query statement, but I'm just giving ... FROM Query1 AS A LEFT JOIN Query2 AS B ... FROM Query1 AS A RIGHT JOIN Query2 AS B ...
    (microsoft.public.access.queries)