Microsoft Office Tutorials and References
In Depth Information
Making a Rolodex-type Selection List Box
Figure 91 – Form Properties Window
All of the Allow properties have been set to Yes; it is impossible to manipulate
the data without doing this. For a test, go to the bottom of the list and enter a
new last name, “Xtra”. This triggers an insert when another line is chosen. The
X will appear in the list box. Next, click on the left gray square in front of the
[ID] field and press the Del button on the keyboard. This triggers a Delete, and
Access requests confirmation. Press Yes; the row is removed and the X
disappears from the list box.
Acs
Updating a row causes a change in the character list, too. Add the name “Xtra”
again. After the X is added, change the name to Ixtra to see this occur.
To create the list box based on the first character of the first name, you need
this simple query:
SELECT DISTINCT UCase(Left([LastName],1)) AS [Char] FROM tblName;
The Left([LastName],1) pulls the first character from the Lastname field and
the UCase() function ensures that uppercase characters are returned. Because
only unique characters are desired, there is the DISTINCT predicate to remove
the duplicates. The query looks like Figure 92 :
 
Search JabSto ::




Custom Search