Lookup fields sorting

grades

Registered User.
Local time
Today, 11:38
Joined
Apr 19, 2012
Messages
44
Hi,
I have a small table with 2 columns (and a Pkey) both are lookups from other tables. The purpose is for matching up an employee ID with a name from 2 different systems, so the user might need to set a value in one or the other lookup field.

The first lookup "ApplicableAgent" looks like this:
display ctrl: list box
row source type: table/query
row source: tblAgentErrors
Bound column: 6
Column count: 6
heads: no
widths: 0,0,0,0,0,2
multiple values: no
list edits: no
list items edit form:
only source values: no

--the 6th column is what shows the name, where the human users need to manually match it up with my second lookup PayrollID:

display ctrl: list box
row source type: table/query
row source: tblAgentInfo
Bound column: 1 (numeric ID for agents)
Column count: 7
heads: no
widths: 1,0,0,0,0,1,1 (names stored in columns 6 & 7)
multiple values: no
list edits: no
list items edit form:
only source values: no

This method works ok, but the problem I am having is the user needs to browse through the list boxes of hundreds of agents to find the correct one, neither of which are sorted by the name column.
Both lookups are sorted based on column1 from their respective tables. My issue is I want to sort the lookup list boxes based on the names so that users can browse down the list. Is there a way to sort these by some other column than the bound column? I've tried just saving the table sorted by the name but that has no apparent effect.

Thanks,
John
 
Actually, this brings up another question i had but I may as well post it here since it's somewhat similar.
In a seperate form I have a listbox with all the employee names. Typing in this box searches for the name but only the first letter - subsequent keyboard input will jump to the first person of each individual letter. Is there a way to have it continue searching based on the entire string in the list box field?

Thanks,.
 
Ohh, i never knew you could build queries for that! but I see it now.

The Access standard is subsequent letters filling in the word, not jumping to other sections of the list. If your combo is jumping, you have code behind it that is making it behave that way. Get rid of it.
Ah thank you, I had a requery on update for other purposes. I'll find a way around that.

Thanks for your help.
 

Users who are viewing this thread

Back
Top Bottom