RE: LookUp Tables



The dlookup can return only one value, to return more then one value it is
better to use Open recordset then running few dlookup, that way you access
the record only once and get all the values

But in the dlookup you can perform filter on more then one field
dlookup("FieldName","TableName", "FieldNumber = 1 And FieldText = 'aa')
You can also filter on parameters
dlookup("FieldName","TableName", "FieldNumber = " & Param1 & " And FieldText
= '" & Param2 & "')
"olorin53" wrote:

> Being new to this, I would like to know if LookUp Tables can have more than
> just two fields. (i.e. pkProductType, and Product).
> The reason being is that ALL products have a unique part number.
> I am reluctant to use the part number as the Primary Key even though it is
> unique to each product. I also wish to build tables for components (that go
> into the products) that also have unique part numbers.
> Would I be able to have THREE fields in the LookUp Tables?
> That is "pkProductType", "ProductPartNumber", and "Product".
> I have read enough on various forums etc to know that Look Up Fields should
> be avoided like the plague.
> Any help would be appreciated
.



Relevant Pages

  • Re: DLookUp-Am Lost
    ... does not exist in ACCESS VBA itself. ... is quite different from what you show for LookUp attempt. ... the subform to the main form using the LinkChildFields and LinkMasterFields ... it's possible that DLookup may work for you. ...
    (microsoft.public.access.queries)
  • DLookup
    ... not then lookup the default values. ... you may want to consider using a CRS ... would be to use DLookup inside an NzFunction to return ... >All English courses use pink paper. ...
    (microsoft.public.access.queries)
  • RE: DLookup issue
    ... Looking again at your dlookup I noticed that you have no field to compare with ... I dont understand your filter. ... >> that query you have two tables with that same field name. ...
    (microsoft.public.access.reports)
  • Re: The Condition in a Macro
    ... > The DLookup is not going to filter anything... ... >> Now with your DLookup, for some reason, it has every single record, which ... >>> If you want to read the value from a control on an open form, ...
    (microsoft.public.access.macros)
  • Re: The Condition in a Macro
    ... The DLookup is not going to filter anything... ... Condition expression, ... If you're wanting to filter ...
    (microsoft.public.access.macros)