drop down list with two keys

G

Guest

I have a membership database, where the members table contains the columns
ID1, ID2, LastName, FirstName. ID1 and ID2 together form the unique key. I
would like to create a form to allow users to populate a new table with pairs
of members. When creating a new record, the user would select two members
from two lists of all members, in the form LastName, FirstName, and two pairs
of ID1 and ID2 would be stored. When viewing an existing record, the names of
the existing members would be displayed, with lists of all members, allowing
them to be changed.

Any help with this would be greatly appreciated.
 
G

Guest

Lallen,
I usually face such a problem, the fastest solution is to add another field
in the MEMBERS table, and call it myID of type (AutoNumber). You don't have
to remove the existing ID1 & ID2 fields. So, you will refer to a single-field
PrimaryKey rather than a double-field one.

After that, set the RecordSource property of both of the ListBoxes to:
Select myID, LastName, FirstName From MEMBERS_TABLE;

And make sure the BoundColumn property is set to 1, which is the field myID.

I think this will solve any problem so far. Try it and inform me if you
need anymore things.


Regards
Rashed
 
G

Guest

Thanks Rashed. I'll let you know how it works.

Rashed said:
Lallen,
I usually face such a problem, the fastest solution is to add another field
in the MEMBERS table, and call it myID of type (AutoNumber). You don't have
to remove the existing ID1 & ID2 fields. So, you will refer to a single-field
PrimaryKey rather than a double-field one.

After that, set the RecordSource property of both of the ListBoxes to:
Select myID, LastName, FirstName From MEMBERS_TABLE;

And make sure the BoundColumn property is set to 1, which is the field myID.

I think this will solve any problem so far. Try it and inform me if you
need anymore things.


Regards
Rashed
 
G

Guest

Rashed,

Not sure if I am asking this correctly...
I am creating a membership database where I need the members to be listed in
the following orer (using the auto number sequence).
Head of household---ID# 001.01
Spuse---ID# 001.02
Child---ID#001.003
The purpose is to keep the family together with ID# 001 and use the .01,.02
and.03 to identify the members of the family.

How would I accomplish this.

Thank you in advance.

Goran.
 

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