Jump to content

How to display related data at input time?


This topic is 5291 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi all.

This has got to be the most basic question but it's got me stumped!

I have two tables: "Buildings", consisting of two fields: Building_Id (the key, numeric, auto-enter serial) and Building_Name (text).

And "Units", consisting of Unit_Id (key, numeric, auto-enter serial), Unit_Description (text).

A building consists of one or more units.

I want to relate the two files so that when I'm looking at the "Units" layout I'll see what building a unit belongs to; I've added, in the "Units" table, the field Unit_Bldg_Id (number) and created the relationship to connect Buildings::Building_Id and Units::Unit_Bldg_Id.

On the Units layout, I've added the field Unit_Bldg_Id, setup as a drop-down list, displaying values from a value list that "use values from first field" Building_Id in table "Buildings". I've also chosen the option to "also display values from second field" Building_Name from table "Buildings". Finally, I've also chosen the option to "show values only from second field".

Now, when I create a new unit and reach the field in question, I do get my drop-down list and it's displaying the Building names.

However, as soon as I select one of the items in that list, it plunks the Building_Id into the field, and not the Building_Name which it was displaying...

PLEASE... is there a way to get the Building_Name and only the Building_Name in that field???

So sorry to trouble you with such a simple question, but it's really got me!

P.S. Would the answer be to use the Building_Name as the key into the Buildings table and do without the "numeric, auto-enter serial" field altogether???

Thanks!

This topic is 5291 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.