I need a little help with some code (1 Viewer)

Jon123

Registered User.
Local time
Today, 18:18
Joined
Aug 29, 2003
Messages
668
Code:
Me.step = Left(Me.step, InStrRev(Me.step, ",") - 1)

This code works fine as long as it can find the "," but if there is no , entered it errors or. Is there a way I can look for the comma before this code runs?

jon
 

Mr. B

"Doctor Access"
Local time
Today, 17:18
Joined
May 20, 2009
Messages
1,932
Try:
Code:
If instr(1, me.step, ",") > 0 then
             Your code here
end if
 

Jon123

Registered User.
Local time
Today, 18:18
Joined
Aug 29, 2003
Messages
668
thank you very much Mr. B

worked like a charm

jon
 

Users who are viewing this thread

Top Bottom