R
Robert Neville
I have a combo box that allows me to add data or select from the list.
If I select the record marker, [Add New], then the code adds a new
record. Now, I am developing a complicating routine that requires the
[Add New] marker to remain first in the list. Thus have a listindex
property must equal to zero. Generally, it does not create a problem,
yet on the rarely occasion inconsistent data may sort before the [Add
New] Marker, because preceding spaces sort before the bracket; and
null value & empty strings add complexity to this scenario.
Several approaches exist, yet I would appreciate any ideas from thread
readers before implementing one approach or the other. I am hoping to
do it through the combo boxes SQL/Query source. Here's what its look
like now.
SELECT tblAddr.AddrID, tblAddr.Addr1, tblAddr.AddrName, tblAddr.City,
tblAddr.StateID, tblAddr.PostalCode, tblAddr.Country
FROM tblAddr
ORDER BY tblAddr.Addr1;UNION SELECT AddNewMarker As Addr1 FROM
zstblDefault;
If I select the record marker, [Add New], then the code adds a new
record. Now, I am developing a complicating routine that requires the
[Add New] marker to remain first in the list. Thus have a listindex
property must equal to zero. Generally, it does not create a problem,
yet on the rarely occasion inconsistent data may sort before the [Add
New] Marker, because preceding spaces sort before the bracket; and
null value & empty strings add complexity to this scenario.
Several approaches exist, yet I would appreciate any ideas from thread
readers before implementing one approach or the other. I am hoping to
do it through the combo boxes SQL/Query source. Here's what its look
like now.
SELECT tblAddr.AddrID, tblAddr.Addr1, tblAddr.AddrName, tblAddr.City,
tblAddr.StateID, tblAddr.PostalCode, tblAddr.Country
FROM tblAddr
ORDER BY tblAddr.Addr1;UNION SELECT AddNewMarker As Addr1 FROM
zstblDefault;