If ID is a number you don't need the '..'
=DLookUp("FNameF","tClient","ID = " & [ClientID])
Peterhttp://access.xps350.com/
Hi,
I tried your suggested syntax and still get the same #ERROR asking for
the ClientID parameter.
I suspect this query is the problem. ClientID is in the tInv table,
which is included in the query in the rInv report's record source like
this:
SELECT tInv.AmountRec, tInv.InvNo, tInv.InvDate, tInv.InvNote,
tInv.ClassCode, tInv.PaymentMethod, tInv.ClassDates, tInv.Terms,
tInv.DueDate, tInventoryTransactions.ProductCode,
tInventoryTransactions.UnitsSold, tInv.InvDtlNo, tInv.ReceiptNo,
tInv.PrevDepMethod, tInv.PrevDepAmount,
tInventoryTransactions.InvoiceID, tInv.Payment, tClient.ID,
tClient.FNameF, tClient.FNameC, tClient.LName, tClient.Address1,
tClient.Address2, tClient.City, tClient.Prov, tClient.Country,
tClient.PCode, tClient.PhoneH, tClient.PhoneB, tClient.PhoneC,
tClient.EmailB, tClient.EmailP, tClient.PhoneExtB,
tProduct.ProductCode, tProduct.ProductDescription, tProduct.UnitPrice
FROM (tInventoryTransactions INNER JOIN ((tClient INNER JOIN tInv ON
(tClient.ID = tInv.PayerID) AND (tClient.ID = tInv.ClientID)) INNER
JOIN tClass ON tInv.ClassCode = tClass.ClassCode) ON
tInventoryTransactions.InvoiceID = tInv.InvNo) INNER JOIN tProduct ON
tInventoryTransactions.ProductCode = tProduct.ProductCode
WHERE (((tClient.ID)=[tInv].[PayerID] Or (tClient.ID)=[tInv].
[ClientID]));
I read information on queries, but struggle to understand the words
that I'm reading. Because of this, I tend to throw anything in that
might be needed and hope it works (I'm in the process of reading
Access 2003 for dummies). The types of joins baffle me.
The real problem to solve is this. tClient table has name, address,
email type information with ID auto number key. Imagine an invoice
with two tClient.ID's associated to it like a PayerID and a ShipperID,
which are both the same as one of the tClient.IDs. The PayerID and
ShipperID are collected in fInv form and stored in tInv table - one
for each invoice. Now, rInv report should display full contact
information from the tClient table (name, address, etc.) where the
PayerID matches a tClient.ID and the ShipperID matches the same or
different tClient.ID.
This is the real dilemma I've been struggling to solve all week. I'm
wondering if I need separate tables for shipper and payer contact
information. It seems like duplicate work that way.
If anyone can help, they will be my hero. Thanks again,
Michele