It's me again. I thought that I had solved my problem but I didn't. This is how the function looks.
Function Seperate(Field)
Field = Cstr(Field)
RSpace = InStr(Field, " "
Field = Left(Field, RSpace - 1)
Seperate = Field
End Function
It gives me an error saying:
Invalid procedure call or argument: 'Left'
The wierdest thing that I found out was, if I did it like this:
Function Seperate(Field)
Field = Cstr(Field)
RSpace = InStr(Field, " "
Field = Left(Field, 2)
Seperate = Field
End Function
it worked with no problem. The thing is I do not know how many characters from the left I will need. Whether it is 2 or 1 or ever how many. This is the blindfold nature of programming.
Any help will be appreciated.
Thanks
Joeyh
Function Seperate(Field)
Field = Cstr(Field)
RSpace = InStr(Field, " "
Field = Left(Field, RSpace - 1)
Seperate = Field
End Function
It gives me an error saying:
Invalid procedure call or argument: 'Left'
The wierdest thing that I found out was, if I did it like this:
Function Seperate(Field)
Field = Cstr(Field)
RSpace = InStr(Field, " "
Field = Left(Field, 2)
Seperate = Field
End Function
it worked with no problem. The thing is I do not know how many characters from the left I will need. Whether it is 2 or 1 or ever how many. This is the blindfold nature of programming.
Any help will be appreciated.
Thanks
Joeyh