Listbox displays Primary Key

G

Guest

Greetings, thank you all for looking at this Discussion Question. We have a
situation where we maintain a list of Companies...there is another area that
maintains their own list of companies. The problem is lately this other area
has been coming to us for support/data. The difference of how the company
names have been stored (Spelling and such) is becoming a major hurdle. I
decided to create a very fast database that will allow us to realitively
quickly run through their companies and assign one of our company names to
it. Brief outline of database...

Two tables
tbl us
USID: Autonumber (primary Key)
USNAME: Text

tbl them
THEMID: Autonumber (primary Key)
THEMNAME: Text
THEMIDENTIFICATION: Number
USNAME: Number (This is being changed by access when I create the lookup
to the above mentioned USNAME)

So I then Create a form called frm find company
The form contains a list box with three columns from the tbl
them...THEMIDENTIFICATION, THEMNAME, USNAME

I set an event for the double click to open a form where I can then assign a
value to the USNAME field in tbl them. Hope that makes sense. So here is
the problem...

The list box displayes the correct THEMIDENTIFICATION, Correct THEMNAME, but
the USNAME is the ISID from the tbl us. For the life of me I cannot get it
to display the USNAME. This should have been super easy but I am sure I am
getting stuck on something silly. Any help would be greatly appreciated.

-John
 
T

tina

first of all, sounds like you created a Lookup field (or more than one) in
your *table(s)*. if so, recommend you get rid of the lookups in the
table(s). see http://home.att.net/~california.db/tips.html#aTip8 for more
information.

in your form design view, go to the RowSource property of the listbox, click
the Build button (...) at the right side, and add tbl us. link the two
tables on the tblus.USID and tblthem.USNAME fields. pull the USNAME field
into the design grid so it will be available in the listbox. close the
design grid and save. make any appropriate adjustments to the ColumnCount
and ColumnWidths properties of the listbox control.

hth
 

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