How to Use the Mid Function to Get the Right Side of a String in Microsoft Access

preview_player
Показать описание
In this Microsoft Access tutorial, I will show you how to use the Mid function to extract the right side of a string, an easier alternative to the traditional Right function. Learn how to handle variable string positions, split full names, and simplify your data manipulation processes.

BECOME A MEMBER:

LEARN MORE:

PREREQUISITES:

USAGE:
SpacePos: InStr([FullName]," ")
FirstName: Left([FullName],[SpacePos]-1)
OldLastName: Right([FullName],Len([FullName])-[SpacePos])
NewLastName: Mid([FullName],[SpacePos]+1)

RECOMMENDED COURSES:

FREE TEMPLATE DOWNLOADS:

ADDITIONAL RESOURCES:

KEYWORDS:
TechHelp, Access 2016, Access 2019, Access 2021, Access 365, Microsoft Access, MS Access, MS Access Tutorial, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #learn, #lesson, #training, #database, Mid Function Microsoft Access, Right Side String Access, Mid Function vs Right Function, Extract Last Name Access Query, String Manipulation Access, Access String Functions Tutorial, Full Name Split Access, Text Functions Access Database, Access Data Import Full Name, String Length Position Access

QUESTIONS:
Please feel free to post your questions or comments below. Thanks.
Live long, and prosper.
Рекомендации по теме
Комментарии
Автор

WOW! I started on TRS80 Model 1 GREAT TIP! Thank you!

IF LEFT$(Q$, 1) = "R" THEN OD = VAL(MID$(Q$, 2, (LEN(Q$)))): DE$ = "CR ": S = 1: PE = 7: PT$ = "RETURN "

youknow
Автор

Great video, Richard! This is the reason why I like to watch "Beginners" videos. There is always something to learn from them!

Shadow.Dragon
Автор

thank you Richard. I have been watching your videos for many years, unfortunately access is only a hobby for me

bryancoleman
Автор

It's funny because this week I've implemented something similar because I've been developing some custom string functions:len(), rigth(), left(), etc. that will work with Unicode strings with code points above 65535 because standard string functions don't work as expected, because 1 Unicode codepoint over 65535 uses 2 characters in a VBA string. 😂

xavierbatlle
Автор

Rick, have you been sleeping for 30-something years?😂

Honestly blew *my* mind that you *didn't* know this. Normally wouldn't point that out to somebody, but hey, you did ask!😊

rtatt
Автор

What about mij name Rob Groote Woortmann. First name is Rob and lastname Groote Woortmann. Then you hae 2 spaces how to handel it? It is my real name

grootew
Автор

This is why I sometimes take beginner courses (or watch beginner training videos) - Especially with Microsoft products. So many things are available it's hard to learn them all. I also use the 'record macro' option to create vba code when I don't immediately have a solution.

bjones