NauticalGent:
Pardon me for jumping in here, but I thought this might be useful to others.
No problem with that my friend.
Unfortunately, particularly as Daniel is a personal friend and fellow Access MVP, I was obliged to remove the link due to the site regulations on linking to other sites that are commercial and not sites provided by the provider of the software itself.
Nevertheless, the point is made. You can set up a wrapper function in your own project as long as it's defined as
Public
. BTW it's easier to use from a standard module but not absolutely necessary.
In this case though, unless you want a project that uses a variation of
Split()
from multiple different QueryDefs or other SQL, it makes better sense to provide a function to do the job itself. An example of that is in post #2.
NauticalGent:
Why Team Access did not make the Split() Function available in the Query grid is beyond me
QueryDefs, just like any part of access using SQL or expressions, is clearly not in the VBA environment. Jet/ACE SQL, which runs the SQL in an Access database, has access to The Expression Service (TES). TES has access to one/some of the most basic libraries that Access has, including your own project, but certainly not the VBA one.
Split()
is found as
VBA.Strings.Split()
- thus is unavailable to TES even though it's available to your projects VBA code. I hope that explains why MS never made
Split()
available to use in expressions - even though most of us would love to have it available ;-)