Connecting Tech Pros Worldwide Forums | Help | Site Map

Substrg command in Access

Newbie
 
Join Date: Feb 2007
Posts: 4
#1: Feb 26 '07
I am using Access 2000.
I need Substrg command in Access 2000.
Kindly send the SQL script for the same in Access 2000.

dorinbogdan's Avatar
Expert
 
Join Date: Feb 2007
Posts: 822
#2: Feb 26 '07

re: Substrg command in Access


Use the Mid function.
Newbie
 
Join Date: Feb 2007
Posts: 4
#3: Feb 28 '07

re: Substrg command in Access


Thanks for your reply.
kindly teach me how to use mid function in Access SQL editor
Newbie
 
Join Date: Feb 2007
Posts: 4
#4: Feb 28 '07

re: Substrg command in Access


Thankyou.
Kindly teach me how to use mid function in access SQL editor
dorinbogdan's Avatar
Expert
 
Join Date: Feb 2007
Posts: 822
#5: Feb 28 '07

re: Substrg command in Access


Expand|Select|Wrap|Line Numbers
  1. ' Creates text string.
  2. Dim TestString As String 
  3. TestString = "Mid Function Demo"
  4. ' Returns "Mid".
  5. Dim FirstWord As String 
  6. FirstWord = Mid(TestString, 1, 3)
  7. ' Returns "Demo".
  8. Dim LastWord As String 
  9. LastWord = Mid(TestString, 14, 4)
  10. ' Returns "Function Demo".
  11. Dim MidWords As String 
  12. MidWords = Mid(TestString, 5)
  13.  
  14.  
  15.  
Reply