function

  • Thread starter Thread starter Craig
  • Start date Start date
C

Craig

is there a function that returns the character position at
which a particular substring starts...

for instance lets take the string "MICROSOFT" and the
substring "SOFT"

is there a function that would return the number 6 for
this particular case, since "SOFT" starts at the 6th
character position in "MICROSOFT"?

if anyone knows any web site references where i can find
function definitions for VBA on Access '97, I would
appreciate that too
 
InStr("MICROSOFT", "SOFT")

For a list of functions in Access 97:

Open Help and click the Contents tab.
Navigate to the topic: Microsoft Access and Visual Basic for Applications
Reference
Within the above topic: navigate to the sub-topic Functions
All built-in functions are listed alphabetically. You can click on any one
and see a description
 
Function Instr returns start position of string
st1="Microsoft"
st2="soft"
intN=Instr(1,st1,st2)
'search starts at character 1
'intN returns 6
 
Back
Top