The autocomplete feature only applies to text fields. When the user begins typing it can suggest values for them to select which will insert into the text field. It will not limit them to only using those selections. So with that said simply edit your text field then under Integrations > CB Query Field > Auto Complete you can configure it as follows.
Query Auto Complete: Enable
Query:
Code:
SELECT `id`, `username` FROM `#__users` WHERE `username` LIKE '[value]%' LIMIT 10
Value Column: id
Label Column: username
Minimum Length: 3
With the above example it would autocomplete a users username and store the users user id. The "Value Column" parameter determines what is inserted into the text field while "Label Column" is just for display purposes. So if you need it to insert some sort of new number based off the current numbers you'll need to generate that and return it in your SQL.