This is a pretty basic question about looking up people's names then pulling in extra data about them, starting from the position that I want names stored as separate FirstName and LastName.
In the Northwind Orders form there are two lookups, both using the technique of a combo box with an ID source but showing a lookup to a text value.
Bill To : this is okay as it has a NotInList procedure
SalesPerson : this displays LastName, FirstName but doesn't have a NotInList procedure
The latter is my situation, ie how to make this allow selection of names from the list but respond in a sensible way when a new name has to be entered. For names in the list I want to automatically add things like address details, which I know how to do.
My standard NotInList procedures take what's entered as a new value in the combo box and transfers it into the form that allows creation of the lookup list. This process is smooth. With the Northwind method it gets messy because the displayed entry is a compound of the two name fields.
I see a lot written about the evils of this type of lookup so what's the better way of doing it?
In the Northwind Orders form there are two lookups, both using the technique of a combo box with an ID source but showing a lookup to a text value.
Bill To : this is okay as it has a NotInList procedure
SalesPerson : this displays LastName, FirstName but doesn't have a NotInList procedure
The latter is my situation, ie how to make this allow selection of names from the list but respond in a sensible way when a new name has to be entered. For names in the list I want to automatically add things like address details, which I know how to do.
My standard NotInList procedures take what's entered as a new value in the combo box and transfers it into the form that allows creation of the lookup list. This process is smooth. With the Northwind method it gets messy because the displayed entry is a compound of the two name fields.
I see a lot written about the evils of this type of lookup so what's the better way of doing it?