hmmm...
Is your Track Name Autocorrect option turned off? Make sure that's off and
do a compact and repair. It seems likely that between the autocorrect and
any leftovers from an unrepaired/compacted database, and the assumed variant
datatype vInitialsTemp that Access may see the leftover field Split and be
trying to assign a field object type to the variant.
Check the Autocorrect, change the datatype to a string rather than variant,
disambiguate the Split function (strInitialsTemp = VBA.Split(strPatientName,
" ")), compile all modules, compact and repair, and then try again. If it
doesn't work you may want to import everything into a new database, but I
don't think this will be required.
The string variable strInitialsTemp will have to be declared as an array to
avoid a type mismatch:
Dim strInitialsTemp() As String
(the variant datatype, not declared as an array should work with the
function, but a variant decalred as an array produces a type mismatch error.
The reverse applies for strings, but you should avoid variants without a
specific need)
The Track Name Autocorrect feature is recommended to be always turned off,
for various performance reasons and some bugs that it may introduce. In 2003
it can be found under the Access menu at Tools -> Options -> General Tab,
lower right corner. Not sure about other versions.
hth
--
Jack Leach
www.tristatemachine.com
"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)