Re: Lookup in a table

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Wayne Morgan (comprev_gothroughthenewsgroup_at_hotmail.com)
Date: 06/10/04


Date: Thu, 10 Jun 2004 18:26:42 -0500

Howard,

To do the same thing as the code you have but without the combobox, use the
DLookup function. This will allow you to specify a field in a table or
stored query and add criteria to make sure that you get the value from the
correct record.

-- 
Wayne Morgan
MS Access MVP
"Howard" <anonymous@discussions.microsoft.com> wrote in message
news:1acc401c44f05$957637c0$a401280a@phx.gbl...
> Hi Wayne,
>
> I apologise, as I wasn't clear. The select statement I
> gave you was from a form with a combo box lookup which,
> yes, does work. I now need to do the same thing elsewhere
> in my code that does not have the luxury of using a combo
> box to do a lookup. It's a routine that is adding a many
> many records to a table at the click of a button. While
> adding these records, I need to obtain some of the
> information to stuff in the fields from other lookup
> tables. Using the example I gave, how do I do the lookup
> (select statement) from inside my routine? Thanks!
> -Howard


Relevant Pages

  • Re: Make yield_task_fair more efficient
    ... This patch makes the routine more efficient by ... reducing the cost of the lookup ...
    (Linux-Kernel)
  • Math libarary
    ... I wrote a routine to replace Math's Exp method but it turns out to be almost ... I'm essentially using a lookup table and interpolate between integer ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: About speed
    ... After converting types in lookup tables and in the function i tested the routine to make sure that i am getting the same results. ... I am measuring 7 cards evaluator inlined and un-inlines. ...
    (borland.public.delphi.non-technical)
  • Re: Ado SQL Concept question.
    ... > Hi Rick, ... > At the beginning of your routine, create a query that returns those values ... I'm just 'stress' testing the lookup. ...
    (borland.public.delphi.database.ado)
  • Re: Form / Subform Autosave and Events sequence
    ... tblProgramType is the lookup table. ... >> Wayne Morgan ... >>> off the Main form into the subform). ...
    (microsoft.public.access.formscoding)