Re: LOCATE vs. LOOKUP



I would not change the code. Locate changes the cursor postion. Lookup
does not. That is the only difference.

--
Bill Todd (TeamB)


Keith G Hicks wrote:

> I recently discovered that in several places in my current app I
> should probably be using "Lookup" rather than "Locate" on TDataSets.
> For example in areas where I have a data set in a data module and use
> it to lookup information sometimes. A dataset might have 4 columns
> and I need to find the value in column 3 based on the value in column
> 1 and then use the value somewhere in the program. I don't really
> need to be "on" the record located at this point as long as I'm able
> to get the value I want. I'm essentially using Locate to do the job
> that Lookup does. It works just fine as far as I can tell. I haven't
> encourntered any obvious problems with respect to this. But I was
> wondering what the experts have to say especially with respect to
> overhead. Just looking for opinions. Would rather not switch all
> these around if it's not necessary.
>
> Thanks,
>
> Keith
.



Relevant Pages

  • Re: Help with syntax for passing a field value to a lookup query?
    ... Keith ... >I trust you are not attempting to create lookup fields in a table design. ... > You can and should use lookups (combo boxes) on forms. ... >> combo box to display only Phoenix and Tempe... ...
    (microsoft.public.access.tablesdbdesign)
  • lookups
    ... I am trying to use a lookup ... statements that copies values out of one spread sheet over ... I have to do a special paste ... Keith ...
    (microsoft.public.excel.worksheet.functions)
  • Re: OT Excel (VLOOKUP?)
    ... In article, Keith (Southend) ... 58 implies the 58th column of the lookup table, ...
    (uk.sci.weather)
  • Help with syntax for passing a field value to a lookup query?
    ... I am trying define a lookup field in a table where the values displayed ... box to display only Phoenix and Tempe... ... Keith ... Prev by Date: ...
    (microsoft.public.access.tablesdbdesign)
  • LOCATE vs. LOOKUP
    ... areas where I have a data set in a data module and use it to lookup ... using Locate to do the job that Lookup does. ... Would rather not switch all these ...
    (borland.public.delphi.database.ado)