Lookup values in a form

M

MikeB

I have a table that has foreign keys to other tables. In a form, I'd
like to display values from the tables that the foreign keys point to.

Do I have to construct a query table that has the values or can I code
the controls in a way that they perform the lookup function by
themselves?

Thanks
 
T

Tom van Stiphout

On Thu, 19 Jun 2008 19:20:51 -0700 (PDT), MikeB <[email protected]>
wrote:

I'm not sure what you mean by "query table", but it may make sense to
inspect a sample application to see how they do it. Typically one
creates a dropdown with two columns: one is a hidden ID column, and
one is a visible Description column. Then you set the width to "0;1"
and the BoundColumn to 1, and the ControlSource to the field in the
main form, and the RowSource to a query that pulls the ID and
Description from the related table. No code is needed.

-Tom.
 
M

MikeB

I think you could do it either way. Maybe use DLOOKUP(). Look it up in help.

Bonnie

http://www.dataplus-svc.com

I need a touch more help, please.

I have a table: WeaveStatistics, in it I have the following fields:
Weavename, Material, Rings, Time

Material is a foreign key pointing to a type of material in the
MaterialList table.

MaterialList table consists of : ID, MaterialName, MaterialAbbrev

If I want Dlookup() to display the MaterialName value, I tried this
in the text control on my form:

=Dlookup(MaterialName, MaterialList,Material) and I get a #name
error. What am I doing wrong?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top