Look up lists - allow non0list entries

I

Ian

I tried this post on the general board and didn't get a
response - I'm hoping someone can help and it's simple,

I've been using the lookup list wizard but want to allow
other items to be entered in the field(better yet I'd
like the other items entered to be entered into the list
table!). Tbl_client has a field (resources)that uses
LU_resource to look-up

Anyway I when into properties of field-resources and
changed the "limit to list" option to YES and the colomn
width to 2;1 (I can't really remember what I changed the
first number to but I remember changing it from 0;1)

The field type is stuck on interger (??because of the
lookup relationship created) so now if I don't
choose something from the list it only accepts a number.
I'm sure there's a simple solution (possible to both
problems?). Please help.

Ian.
 
A

Allen Browne

Your lookup table uses a number as the primary key, and then a text field.
Are you able to change it so the Text field is the primary key, and
eventually (when everything else is right), drop the Number field?

If so, you can then use a Text field (same size) in your related table. Then
you no longer have the problem of the hidden (zero-width) number field, and
so it is possible to type new text values into this foreign key field and
have them added to the primary key of the lookup table via the combo's
NotInList event. Details on how to do that in this article:
NotInList: Adding values to lookup tables
at:
http://allenbrowne.com/ser-27.html

If you cannot change the lookup table so it uses a natural (text) key
instead of a number, you may be happy to use the DblClick event of the combo
to open a form where the user can enter new values in the lookup table. In
the AfterUpdate event of this form (and the AfterDelConfirm event), then
requery the combo on the original form, so the new value is there once the
user gets back there.
 

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