473,386 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

expected array: compile error WHEN I MAKE EXE IT SHOWS ERROR EXPECTED ARRAY IN STR_PV

Public Sub Sub_serialNo()
Dim rs_tmp12 As New ADODB.Recordset
Dim STR_PVNO As String
Set rs_tmp12 = Nothing
rs_tmp12.Open "Select prefix from VoucherTypeMst where Name='JOURNAL VOUCHER'", conn, adOpenDynamic, adLockOptimistic
If Not rs_tmp12.EOF Then
STR_PVNO = BRANCHCODE & rs_tmp12(0) & Format(MONTH(Date), "00") & Format(Day(Date), "00")
End If

If rs_tmp12.State = adStateOpen Then rs_tmp12.Close

rs_tmp12.Open "Select right(max(Voucherno),3) from VoucherMst where VoucherType='JOURNAL VOUCHER' and Voucherdate='" & Format(Date, "mm/dd/yyyy") & "' AND Branchcode='" & BRANCHCODE & "' AND LEFT(VOUCHERNO,3)='" & BRANCHCODE & "' and len(voucherno)=12 and autogen>0", conn, adOpenDynamic, adLockOptimistic

If IsNull(rs_tmp12(0)) Then
STR_PVNO = STR_PVNO & Format(1, "000")
Else
STR_PVNO = STR_PVNO & Format(Val(rs_tmp12(0)) + 1, "000")
End If
VNO = STR_PVNO
End Sub
Oct 3 '17 #1
0 1862

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: zlatko | last post by:
Hello. I am new to .net . I have a managed C++ library. It looks like this. // header file namespace cppnetdll { public __gc class Class1 { public: static int foo_int(void);
6
by: Thomas Connolly | last post by:
I have 2 pages referencing the same codebehind file in my project. Originally the pages referenced separate code behind files. Once I changed the reference to the same file, everything worked...
26
by: drako | last post by:
Hi, I'm a bit stumped as I am getting a "Notice: Array to String Conversion" error when trying to do something that on the surface should be a very simple task - create an array, and write a set...
4
by: silverburgh.meryl | last post by:
I have code which uses Boost lambda in a template like this: using namespace boost::lambda; template<class T> bool lessThanXY( T& src, T& dest ) { return (src.getY() < dest.getY()); } ...
5
by: mackenzie | last post by:
Hello, I am looking for a little bit of help. I am trying to create a dynamically allocated object which contains one or more objects of type boost::pool<>. I get a compiler error when an object...
2
by: Carles Vela i Aulesa | last post by:
Hi, I have a problem when I am trying to compile the .vb assembly to dll in VB studio 2005 Express Edition. I have my onw dll, which looks like: Public Class CL1 Public Shared Function...
2
by: KevinMurphyRJLG | last post by:
I have a managed C++ class with a number of static methods, all of which are declared public. After switching from .NET 1.1 to 2.0 (Visual Studio 2003 to VS 2005), I'm now getting compiler...
1
by: George2 | last post by:
Hello everyone, Here is the code, and if I change line from static wchar_t* p = {PREFIX((wchar_t*)_TEXT("FOO"))}; to static wchar_t* p = {PREFIX(_TEXT("FOO"))};
1
by: mwatson | last post by:
Hey I'm trying to compile a project for class (C++/linux) but I can't figure out what this g++ error means: time.h:22: error: ISO C++ forbids declaration of 'istream' with no type time.h:22:...
0
by: ppletkov | last post by:
Hi - I apologize if this is a simple question in advance :-) (hopefully it is so its quickly resolved!) i'm trying to figure out why i keep getting an error (Compile Error : expected function or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.