@bc 0 Posted March 30, 2006 Report 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? Quote Link to post Share on other sites
pulpfiction 0 Posted March 30, 2006 Report 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.... Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.