2 days ago: New Feature: you can now upload your Profile Picture to the site. Check it out!  Dismiss
 
Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Glossary

New Entries Added Almost Daily!
Click here to get on our Mailing List

   

   Access    Excel    Word    Windows    HTML

 
MS Access

Split

Using the SPLIT Function

In this tutorial you will learn how to use the Split Function.

The Split Function returns a zero-based, one-dimensional array containing a specified number of substrings.

=Split(Expression As String, [Delimiter], [Limit As Long = -1], [Compare As VbCompareMethod = vbBinaryCompare])

string Required. String expression containing substrings and delimiters. If expression is a zero-length string(""), Split returns an empty array, that is, an array with no elements and no data..
[Delimiter] Optional. String character used to identify substring limits. If omitted, the space character (" ") is assumed to be the delimiter. If delimiter is a zero-length string, a single-element array containing the entire expression string is returned..
[Limit] Optional. Number of substrings to be returned; –1 indicates that all substrings are returned..
[Compare] Optional. Numeric value indicating the kind of comparison to use when evaluating substrings. See Settings section for values..

In this example we will work with is "Alex,Jon,Rick".

Split - Function Engine

The result is "Alex" "Jon" "Rick".

This will keep any spaces surrounding the names, so you could use the Trim function to get rid of these.

The Settings are:

Compare
ConstantValueDescription
vbUseCompareOption-1Performs a comparison using the setting of the Option Compare statement.
vbBinaryCompare0Performs a binary comparison.
vbTextCompare1Performs a textual comparison.
vbDatabaseCompare2Performs a comparison based on information in your database. (Microsoft Office Access 2007 only.)

FORM

In a Form you could set the Default Value of a Textbox to

	=Split("Alex,Jon,Rick", ",")
	
VBA

In a Form add a TEXTBOX control and rename it "txtSplit", then you could add the following in the Load Event.

	Private Sub Form_Load()
		txtSplit = Split("Alex,Jon,Rick", ",")
	End Sub
	

Course

Want to learn more? Request this via the contact form.

Search

You can find more about this by searching the website.


Alex Hedley (Avatar) By: Alex Hedley


Click here to sign up for more FREE tips

 

 

 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 3/19/2024 12:32:14 AM. PLT: 0s