Change name field to display ALL CAPS

sonja

New member
Local time
Yesterday, 20:49
Joined
Oct 15, 2013
Messages
2
Specialist Please help novice user... my attendance dB has some last name in lower case and others in all caps base on user input. Is there anyway to make it consistent? Also, please there will be about 250 users scrolling through the name column for attendance. What would you recommend for the most user friendly way to display names? Could you please advise how to create a form that would perhaps allow a button for all last name like "A- C" member name

Thank you in advance for you assistance.
SELECT IIf(IsNull([Last Name]),IIf(IsNull([First Name]),[First Name]),IIf(IsNull([First Name]),[Last Name],[Last Name] & ", " & [First Name])) AS [File As], IIf(IsNull([Last Name]),IIf(IsNull([First Name]),[First Name]),IIf(IsNull([First Name]),[Last Name],[last Name] & " " & [first Name])) AS [Student Name], Students.*
FROM Students
ORDER BY IIf(IsNull([Last Name]),IIf(IsNull([First Name]),[First Name]),IIf(IsNull([First Name]),[Last Name],[Last Name] & ", " & [First Name])), IIf(IsNull([Last Name]),IIf(IsNull([First Name]),[First Name]),IIf(IsNull([First Name]),[Last Name],[First Name] & " " & [Last Name]));
 
Use the UCase() function in your query or report... Or LCase if you want them in all lowers.
If you want names with a single capital you have to search the forum for "Proper case" which isnt something done/supported directly by access but rather a UDF.

If you want to have buttons A-C you can alter your user's recordsource of the form to filter it's input to only display Lastname Like "A*" or like "B*" or like "C*"
I think you can also do >= "A" and <="C" but that may need some tweaking.
 
If you want names with a single capital you have to search the forum for "Proper case" which isnt something done/supported directly by access but rather a UDF.

No user defined function is necessary in Access. Proper case can be done using the built in StrConvert function with 3 as the second argument.
 
Yes the function StrConv takes in a second argument that can do it..
Code:
? [URL="http://msdn.microsoft.com/en-us/library/cd7w43ec%28v=vs.90%29.aspx"]StrConv[/URL]("hElLo wOrLD", vbProperCase)
Hello World
If using outside VBA, use the constant value 3 instead of vbProperCase.
 

Users who are viewing this thread

Back
Top Bottom