@bc Posted March 30, 2006 Share Posted March 30, 2006 hi guys.. i got his Type mismatch error..Type mismatch: 'CLng' here's half the code... If Trim(RstINVENCode(0)) = "123" Then INCode = ITEMCODE & "-" & YR & "0001" Else ICode = RstINVENCode(0) strIC = Mid(ICode,13,7) strcode = Mid(strIC, 3, 4) strcode = CLng(strcode) + 1 OLDYear = cstr(Mid(strIC, 1, 2)) if (clng(OLDYear)+1) = clng(YR) then strcode = "0001" strcode = Clng(strcode) end if The error is in this code line: strcode = CLng(strcode) + 1Anyone willing to help? Link to comment Share on other sites More sharing options...
pulpfiction Posted March 30, 2006 Share Posted March 30, 2006 Hi,I guess the error is bcos of the value of the "strcode".Check if the "strcode" is a proper numberif you can give the sample value of "RstINVENCode(0)" i guess it will be useful to know if "strcode" is valid.... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now