Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Look-up field

Status
Not open for further replies.

PortyAL

Technical User
May 13, 2005
126
GB
Hi

This sounds simple, and probably is, but I can't get it working.

I have 2 tables "Bookings" and "Groups". I want to input data into the "Bookings" table. There is a "Group Name" field in the "Bookings" table which is a lookup field based on the "Group Name" field in the "Groups" table.

When I'm entering data I want all the group names to be in a combo box to pick from, but if it is a new group, I want to be able to type the name in and for it to update the list for future input.

Hope that made sense.

AL
 
are you using a form to do this or are you trying to do this directly against the tables?

--------------------
Procrastinate Now!
 
I've been trying it both ways, but can't get it to work.

Ideally I would like to do it directly in the table design, but if it works via a form, then that would do.

AL
 
I don't think you can do this using the tables themselves, plus it's not a good idea to do that anyway...

using forms, you can have some code in the BeforeUpdate or AfterUpdate event of the combobox which will insert the new entry into the reference table. You can test wether this is necessary by testing the notInList property...

--------------------
Procrastinate Now!
 
Have a look at the LimitToList property and NotInList event of the ComboBox object.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top