Auto selecting on combo box

rschnabl

Registered User.
Local time
Today, 11:13
Joined
Jun 10, 2004
Messages
11
I have a database that contains a field labeled Parent. The field has part numbers that start with the same digit in the first 6 places. The last 6 digits are different. I have added a combo box to a form that allows operators to pick the info. I would like to fix the pick (combo box) so that the operator would only have to type in last 6 digits. Is this possible?
 
I want to make sure I understand your question.

Are referring to the auto-complete feature that the combo box has? So if the number the user wants is 111222345678 you want it to auto-complete by the user typing 3456....?

Is it necessary for the combo box to display the full number or only the last 6 digits, and are new records ever entered into the combo box or is it limited to the list?
 
RichO said:
I want to make sure I understand your question.

Are referring to the auto-complete feature that the combo box has? So if the number the user wants is 111222345678 you want it to auto-complete by the user typing 3456....?

Is it necessary for the combo box to display the full number or only the last 6 digits, and are new records ever entered into the combo box or is it limited to the list?
Thank a whole lot for reviewing my question.
You are correct. My field has numbers 111222345678. Suffix 111222 is the same on all numbers in the field. I would like the operator to be able to type 345678 and the record 111222345678 would be chosen.
Then I would like for the combo box to show the entire number.
 
You'll have to jump through a few hoops to get this to work the way you want it to. I think it's possible, but why not just place "111222" in like a label next to the combo box and place the suffices in the combo box? See the attached picture.

By using multiple columns, the combo box can still store the full number and display just the suffix.
 

Attachments

  • 111222.gif
    111222.gif
    8.6 KB · Views: 140
dcx693 said:
You'll have to jump through a few hoops to get this to work the way you want it to. I think it's possible, but why not just place "111222" in like a label next to the combo box and place the suffices in the combo box? See the attached picture.

By using multiple columns, the combo box can still store the full number and display just the suffix.
This is possible but not out of the question. The only problem is I would have to run it through a qeury first and pull the suffix off first. The info comes from a larger database that I am linking from. The entire Parent part number is already in linked database.
 
Assuming the table is normalised and has an autonumber primary key:

SELECT TableID, Mid(MyField, 6) AS Code
FROM MyTable
ORDER BY Mid(MyField, 6);

The SQL above could be the combo's Rowsource with the first column hidden - essentially you work off the keyt. :)
 
Mile-O-Phile said:
Assuming the table is normalised and has an autonumber primary key:

SELECT TableID, Mid(MyField, 6) AS Code
FROM MyTable
ORDER BY Mid(MyField, 6);

The SQL above could be the combo's Rowsource with the first column hidden - essentially you work off the keyt. :)
I will try this. Thanks a whole bunch
 

Users who are viewing this thread

Back
Top Bottom