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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add to list in Combo Box

Status
Not open for further replies.

Jazzitup

Technical User
Jul 25, 2003
16
BM
[morning] Hi,

I have a combo box that contains
Airport Code, Name of Aiport, Location

It drops down all of this information, and then simplpy populates the field with the Airport code.

As with all combo boxes the user is allowed to type the airport code in the box, but it will only allow the population of codes that already exist:
Question [ponder] :
How can I allow the user to enter New Airports into the already exisiting database, allowing all the fields to be updated.

[pc3]

 
create a data entry form and set its record source to the table that contains Airport Code, Name of Airport, and Location.
 
I actually do have a version of the form that uses that, but it created problems for the users...is there anyway just to do it from the combo box...
 
There are certainly ways to add data to your database via a combo box where "Limit to List" is set to "yes" by using the "On Not in List" event. However, I don't think you'll be able to create new records, with all fields populated, using a single multi-column combo box. In general terms, I offer a couple of alternatives:

1) When the "On Not in List" event fires, ask the user whether they want to add the new airport. If the answer is "yes," open the airport data entry form.

2) Combine the airport combo box and your airport data input form into a single form, such that the user's selection of the airport in the combo box finds the corresponding record. If the user enters an airport code not in the list, ask whether they want to create a new entry, and if yes, create a new record.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top