JGalletta Windows 7 Access 2010 Local time Today, 11:05 Joined Feb 9, 2012 Messages 149 Jan 10, 2013 #1 Guys, Can someone post code for counting commas/specific chars in a string? i.e. String = " A,B,C,D " CountCommas(String) would return 3.. ? My brain is beat for the day..
Guys, Can someone post code for counting commas/specific chars in a string? i.e. String = " A,B,C,D " CountCommas(String) would return 3.. ? My brain is beat for the day..
pbaldy Wino Moderator Staff member Local time Today, 08:05 Joined Aug 30, 2003 Messages 36,269 Jan 10, 2013 #2 One way: ?Len(" A,B,C,D ")-Len(replace(" A,B,C,D ",",","")) 3
JGalletta Windows 7 Access 2010 Local time Today, 11:05 Joined Feb 9, 2012 Messages 149 Jan 10, 2013 #3 That's creative. I like that. Thanks.
pbaldy Wino Moderator Staff member Local time Today, 08:05 Joined Aug 30, 2003 Messages 36,269 Jan 10, 2013 #4 No problem. That's quick and dirty. You could also create a function to step through the characters, or use the Split() function.
No problem. That's quick and dirty. You could also create a function to step through the characters, or use the Split() function.