473,554 Members | 2,835 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

RunTime Error 5

Is there a reason why i keep getting this run time error, i never
gotten it before. Can someone help me out with this? here is my code:

With rstout
'first check if not on EOF
If Not (rstin.EOF) Then
rstin.MoveFirst
'loop through all the records rstIN (table tblPhongParseIN )
Do While Not rstin.EOF
'set strField1 to tblPhongParseIN Field1
strField1 = rstin("ID")
cutstring = Left([strField1], InStr([strField1], " ") -
1)<------This is where i get the error.
strfield4 = rstin("amt_issu ed")

THank you.

Nov 13 '05 #1
10 9863
ph*******@gmail .com wrote:
Is there a reason why i keep getting this run time error, i never
gotten it before. Can someone help me out with this? here is my code:

With rstout
'first check if not on EOF
If Not (rstin.EOF) Then
rstin.MoveFirst
'loop through all the records rstIN (table tblPhongParseIN )
Do While Not rstin.EOF
'set strField1 to tblPhongParseIN Field1
strField1 = rstin("ID")
cutstring = Left([strField1], InStr([strField1], " ") -
1)<------This is where i get the error.
strfield4 = rstin("amt_issu ed")

THank you.


Phong,

When I try MsgBox (Left("My Text", -1)), I get error message 5. That
seems to suggest that " " is not being found in [strField1] causing a
-1 to show up in the Length argument. Also, assuming strField1 is
declared to be a string, there shouldn't be any square brackets around
it. Maybe Access is looking for Me.strField1 because of the square
brackets. Anyway, MsgBox("*" & strField1 & "*") to see if it contains
a blank or not. I also don't see why you need to require a " " in an
'ID' field. Perhaps use an If..Then..Else on whether or not
InStr(strField1 , " ") = 0.

James A. Fortune

Nov 13 '05 #2
Thanks for the reply. i'm just trying to parse this string into
fields.

i have a field that looks like this

Field 1
12345678 MASS
Field 2
;2;3;3;5;08/01/2014;3;100.0000 ;2;1395000.00;5 ;08/01/2015;3;100.0000 ;2;1475000.00;5 ;08/01/2016;3;100.0000 ;2;1555000.00;

i'm just trying to parse field one without the MASS section, and the
second field i was trying to parse out everything except for the DATE
and the PRICE field. Please advise.

Nov 13 '05 #3
sometime field one has more then 9 characters long. So i guess i'm
just looking for a better to parse field one without it bombing.
thanks.

Nov 13 '05 #4

ph*******@gmail .com wrote:
Thanks for the reply. i'm just trying to parse this string into
fields.

i have a field that looks like this

Field 1
12345678 MASS
Field 2
;2;3;3;5;08/01/2014;3;100.0000 ;2;1395000.00;5 ;08/01/2015;3;100.0000 ;2;1475000.00;5 ;08/01/2016;3;100.0000 ;2;1555000.00;

i'm just trying to parse field one without the MASS section, and the
second field i was trying to parse out everything except for the DATE
and the PRICE field. Please advise.


If you are using Access 2000 or higher, you can use the split function
to parse the strings. Does Field 1 always contain a space? I don't
know what the split function will do to ";2;3..." when using ";" as a
delimiter. You'll have to try it.

James A. Fortune

Nov 13 '05 #5
Field 1 always has a space. i'm able to parse field 2. it's just i
don't understand why field 1 doesn't work.

Nov 13 '05 #6
ph*******@gmail .com wrote:
Field 1 always has a space. i'm able to parse field 2. it's just i
don't understand why field 1 doesn't work.


After checking out:

http://groups-beta.google.com/group/...50f165ea?hl=en

Grab the space character and examine its asc() value to be sure it's a
normal space character.

James A. Fortune

Nov 13 '05 #7
What's cutstring declared as? Is it possibly a numeric variable by mistake?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

<ph*******@gmai l.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
Is there a reason why i keep getting this run time error, i never
gotten it before. Can someone help me out with this? here is my code:

With rstout
'first check if not on EOF
If Not (rstin.EOF) Then
rstin.MoveFirst
'loop through all the records rstIN (table tblPhongParseIN )
Do While Not rstin.EOF
'set strField1 to tblPhongParseIN Field1
strField1 = rstin("ID")
cutstring = Left([strField1], InStr([strField1], " ") -
1)<------This is where i get the error.
strfield4 = rstin("amt_issu ed")

THank you.

Nov 13 '05 #8
I got it to work. i had to change some query that was bringing my data
into the table. So i'm getting a runtime error 6 stating an overflow?
i do not know how that error is coming up and why. can someone adivse
on that? thank you.

Nov 13 '05 #9
I got it to work. i had to change some query that was bringing my data
into the table. So i'm getting a runtime error 6 stating an overflow?
i do not know how that error is coming up and why. can someone adivse
on that? thank you.

Nov 13 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
15929
by: Bob Bamberg | last post by:
Hello All, I have been trying without luck to get some information on debugging the Runtime Error R6025 - Pure Virtual Function Call. I am working in C++ and have only one class that is derived from an Abstract class, I do not believe that this class object is causing me my problem. Below is that message I have posted before to other...
5
15105
by: Nathan Bloom | last post by:
Hi, I have a secured database that runs fine on the computer the database is installed on. I have several workstations with access runtime installed that also need access to the database. Access runtime runs fine when accessing an unsecured version of the database. However once the database was secured it generates a runtime error after...
2
3562
by: Paul | last post by:
I'm hoping someone can help me with the problem. I have a database where the default value for a date field in a table is =date() This works perfectly in my table and on my form. But when I complile the DB into a 97 Runtime, the date field displays and #error? in the runtime. But if I open the runtime db on a system with Access 97,...
12
3450
by: Markus Ewald | last post by:
I'm just experimenting around with the VisualC++ 2005 Express Edition Beta and found some strange behavior for which I can't seem to find a workaround. What I've done is set up two static library projects for Lua 5.0.2 and LuaBind beta-6, compiling both with no CLR support and configured to use the Multithreaded DLL runtime. Then I created a...
0
755
by: Kirk | last post by:
I'm trying to use a Web Service to be a Remoting client of an existing ..NET 2.0 server. But I get the following error when I try to use System.Runtime.Remoting.Channels.Http in my WebService. The same code works fine in a standalone app. I have inspected System.Runtime.Remoting.dll with ildasm, and I can see the ....Channels.Http...
0
3223
by: zfraile | last post by:
I'm getting this error from the JIT compiler at runtime, but only on my boss' machine, not my development machine. I believe the error is generated from a call to an Excel object, but I can't tell why or what specific action on the object is causing it. We both are running version 2.0 of the .net framework with Office 2003 installed,...
0
2156
by: Yelena Varshal via AccessMonster.com | last post by:
Hello We have a shortcut for our MS ACCESS application that uses a /Runtime switch because we may have some users that use Runtime. The application worked fine in Access 2000 and was tested with 2003 in the spring. Now that we started to use it with MS ACCESS 2003 (Full version) we are getting the error on the last form close when exiting...
7
8431
by: Norman Diamond | last post by:
A project depends on VC runtime from Visual Studio 2005 SP1, and DotNet Framework 2. Options are set in the setup project properties, so if these two dependencies are not already installed then this installer will install them. But what about the situation where VC runtime has already been installed? In fact it's been installed twice. ...
3
5157
by: Jim Armstrong | last post by:
Hello all - This is driving me crazy. I have a table called tblClients - very simple, has the following fields: taxID (PK) ClientName SalesName The main form of my application allows a user to select a client and
1
4070
by: BL3WC | last post by:
Hi, I'd created a MDE under Access 2003. It is now under testing stage. Some of the users will use Access 2003 runtime and some will use Access 2007 runtime to run this MDE. I installed the Access 2007 runtime on a test machine and place the MDE in the Desktop for user's initial testing. I did not create a trust area for this MDE in the...
0
8008
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7527
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7857
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6114
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5412
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5135
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3538
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3525
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
810
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.