Form

JoeyJ

Registered User.
Local time
Tomorrow, 04:13
Joined
Jun 23, 2005
Messages
10
Hi All

I have a table with three fields: auto number primary key, last name and first name. I have another table where I want to assign tasks to people. I have been told that good programming practice is to link tables via autonumber primary key. This means that in the task allocation table, I allocate tasks to numbers, not people. This is not practical.

I would like to create a form that displays the Last name and first name in a single field and lookup combo box, but stores the autonumber linked to that name, not the name itself. Any ideas on how to go about it?
 
Create a query which adds together your name fields into a single field, with your Auto Number in the first field. Then create a form, add a combo box, then reference it to your query. It should hide the auto number field by default, but if not you can set the first column width to zero. The "Bound Column" should still be the first column so that the number is linking to your table. Not sure where you got the advice tables shouldn't be linked by Auto Number Primary Key; I thought that was what you *should* do. Well no doubt one of the resident guru's will inform us!
 
Thanks reclusive monkey. I tried what you said, except instead of doing a seperate query, I just did it in the row source property of the field on the form, is that ok? It seems to work.

I did say that is what you should do, well that is what I meant anyway.
 
Hi Joey,

Yeah Row Source property is fine. Sorry, I misread your post; not had my second coffee yet ;-) Glad you got it sorted.
 

Users who are viewing this thread

Back
Top Bottom