View Full Version : Do I use Append/Delete?


rhounsome
03-14-2002, 12:35 AM
I have created a table with 3 coloumns each of which has 26 single character entries. I have then generated a query which returns 17576 records. This query is used as a drop down list in a database to assign a 3 letter prefix to each company (prefix is allowed to be used only once). However 17576 records is a lot of records to go through to find a prefix that is not used.

What I want is this list generated by the query to remove a prefix once it has been selected for a company. Would I be right in assuming that I use an Append/Delete query to make this drop down list work. If this is correct what would be the best way to go about it.

Table is called: Company
Cell is called: 3 Letter Reference (Combo List:- Generated from 3 Letter Reference Query)

Alexandre
03-15-2002, 11:45 AM
I am not clear as to the use of generating that many records for the users to choose from, better than let him enter a 3-letters code and check for its uniqueness.
Moreover, untill users have booked many thousands of codes, your combo box will remain painfull to go through.

I would suggest a different approach.
Make a combo based on the 3-letters codes already in use in your underlying db. Let the users enter a 3-letters code in the combo. With the autocomplete feature set to yes they will see, while entering each letter, if their code is already in use or not.
On update, check for the uniqueness of the code entered and validate it or not accordingly.

Does it sound a workable approach to you?

Alex

[This message has been edited by Alexandre (edited 03-15-2002).]

rhounsome
03-20-2002, 04:35 AM
Thanks for the answer. I managed to solve the problem in the end. After generating a query based on the 3 fields and using the autocomplete feature, they can now look to their hearts content. When they have choosen the 3 letter prefix they hit confirm which requests them to enter it again before appending to a used table and then deleting it from the list.