Link to home
Start Free TrialLog in
Avatar of Karen Schaefer
Karen SchaeferFlag for United States of America

asked on

Here is an easy 500 points- return name after comma & stop

How do I change this to return the values after the comma?

        rs(strFieldName) = Left(strNewData, InStr(strNewData, ",") - 1)
k
ASKER CERTIFIED SOLUTION
Avatar of Ken Butters
Ken Butters
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Karen Schaefer

ASKER

rs(strFieldName1) = Mid(strNewData, InStr(strNewData, ",") + 1)

I also found this :
        rs(strFieldName1) = Right(Trim([strNewData]), Len(Trim([strNewData])) - InStr(1, [strNewData], " "))


I am getting Item not found in this collection:

Yes, I am set the variables.
    Dim rs As DAO.Recordset
    Dim strFieldName As String
    Dim strFieldName1 As String

K
thanks that did the trick - I figured out the issue of item not found - I forgot to set the value for the 2nd strFieldName1.

K