Raw data
aaa, bb, ccc, dd
or
aa, bbb, cc
I want field1 to be
aaa, bb, ccc
or
aa, bbb
This drops everything to the right of the 1st comma
field1 would = dd
or cc
This drops everything from the 1st comma on the left to the end.
field 1 would = aaa
or aa
aaa, bb, ccc, dd
or
aa, bbb, cc
I want field1 to be
aaa, bb, ccc
or
aa, bbb
This drops everything to the right of the 1st comma
field1 would = dd
or cc
Code:
Me.field1 = (Right([field1], (InStr(1, [field1], ",") - 1)))
This drops everything from the 1st comma on the left to the end.
field 1 would = aaa
or aa
Code:
Me.field1 = (Left([field1], (InStr(1, [field1], ",") - 1)))