Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need some clarification on "Lookup" the anti-feature

Status
Not open for further replies.

nodrog77

Programmer
Sep 26, 2007
47
AU
Hi All

I'm just wanting to clarify before I start coding away (I haven't done any for 2 years) that using the Dlookup function is not the same as a lookup column in a table. I gather that a lookup column in a table is where you use an ID which links to another table where the Valid list of values to choose from exists.

I am hoping that Dlookup is a nice fast way to lookup up a value in a table rather that opening up the recordset and searching through.

Now I'm looking at my Database I realise that I did create a few lookup columns there when I shouldn't have and maybe it's time to do a cleanup.

Thanks,
Lea
 
Hi mate,

yup, dlookup is a different concecpt. However, lots of people criticise those for being slow and clumbsy too. The legend Allen Browne has an alternative, Elookup (Extended lookup) More info here
Have a great weekend, JB
 
How are ya nodrog77 . . .

In the [blue]Immediate Window[/blue] (hit [blue]Ctrl + G[/blue]) enter [blue]DLookUp[/blue]. Put the cursor within the word and hit [blue]F1[/blue] . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
For the most part, it is best to use combos or listboxes on a form where you might have used a look-up in a table, so:

[tt]tblColours
Color

Red
Blue
Green

tblCompanies
ID Company

1 Giant Widget Ltd
2 Widget Siblings
44 Widbet On-line

tblOrders
<...>
CompanyID : Number
Colour : Text
<...>

frmOrders
cboColours

Row Source: SELECT Colour FROM tblColours
Bound Column: 1
Column Count: 1
Column Widths : 2cm

cboCompanies
Row Source: SELECT ID, Company FROM tblCompanies
Bound Column: 1
Column Count: 2
Column Widths : 0cm, 2cm[/tt]

This method is fast.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top