I want to discover how many times the bar (/) appears inside of the field numnota how do I do?
F Frank Dulk Jul 15, 2003 #1 I want to discover how many times the bar (/) appears inside of the field numnota how do I do?
F Frank Dulk Jul 15, 2003 #2 As I make this function? msmcnewsxp said: you could write a vba routine using a for loop to len of field value and count using instr(myfield,"'") > 0. Click to expand...
As I make this function? msmcnewsxp said: you could write a vba routine using a for loop to len of field value and count using instr(myfield,"'") > 0. Click to expand...
M msmcnewsxp Jul 15, 2003 #4 pick an event for the control like lostfocus dim x as integer dim y as integer for x = 1 to len(numnota.value) if instr(mid(numnota.value,x,1),"/") > 0 then y = y + 1 next x
pick an event for the control like lostfocus dim x as integer dim y as integer for x = 1 to len(numnota.value) if instr(mid(numnota.value,x,1),"/") > 0 then y = y + 1 next x
D Dirk Goldgar Jul 15, 2003 #5 Here's a quick and doubtless inefficient method, but it's a cute one-liner: lngCount = UBound(Split([numntota] & " ","/",,vbBinaryCompare))
Here's a quick and doubtless inefficient method, but it's a cute one-liner: lngCount = UBound(Split([numntota] & " ","/",,vbBinaryCompare))