473,321 Members | 1,667 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,321 software developers and data experts.

Subscript out of range error while not using array.

jv
I have a form that is used every day to create quotes. However, every 2
weeks or so a user would randomly get an error 9 - subscript out range
message. I'm not using any array in this form. Does anyone know that
else might possibly trigger this error besides array?

Thanks

Julie

Nov 13 '05 #1
2 4420
On 11 Mar 2005 13:13:01 -0800, "jv" <ju***********@hotmail.com> wrote:

No, but there's a way to find out: proper error handling and logging.
If every procedure was outfitted with an error handler that called a
central function to display that error (including the procedure name
where the error occurred), and if we then outfitted that function with
some additional logic to write that error to a file or table, then you
would know about as much as you need to narrow this down so much you
could hopefully figure it out. If not, you outfit the offending
function with line numbers, and then your error handler can report the
exact line where it happened.

-Tom.

I have a form that is used every day to create quotes. However, every 2
weeks or so a user would randomly get an error 9 - subscript out range
message. I'm not using any array in this form. Does anyone know that
else might possibly trigger this error besides array?

Thanks

Julie


Nov 13 '05 #2
Other causes of this error are:
- a problem wizard;
- a problem reference;
- code that is being interpreted wrongly;
- a corruption.

Regarding the wizard problem, see:
http://support.microsoft.com/default...b;en-us;306326
If the problem occurs under a predictable set of circumstances, you could
see if you can get it to occur using a known good database, such as the
Northwind sample database. If you can, the problem is with the wizards or
the registered libraries, not with your code and is not a corruption.

If that does not help, try this sequence:
1. Uncheck the Name AutoCorrect boxes under:
Tools | Options | General
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database:
Tools | Database Utilities | Compact

3. Press Ctrl+G to open the Immediate window.
Check your references are okay (none marked "MISSING"), and uncheck any
libraries you do not need. If you are not sure what you need, see:
http://allenbrowne.com/ser-38.html

4. Make sure you have "Option Explicit" at the top of all your modules,
including any modules behind forms and reports. This helps prevent
misinterpreted variables.

5. Make sure the code compiles. Still in the code window: Debug | Compile.
Fix any issues, and repeat until no errors.

If that is still unproductive, try getting Access to recreate your database
for you, by following the steps for the first symptom in this article:
http://allenbrowne.com/ser-47.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"jv" <ju***********@hotmail.com> wrote in message
news:11********************@l41g2000cwc.googlegrou ps.com...
I have a form that is used every day to create quotes. However, every 2
weeks or so a user would randomly get an error 9 - subscript out range
message. I'm not using any array in this form. Does anyone know that
else might possibly trigger this error besides array?

Thanks

Julie

Nov 13 '05 #3

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

Similar topics

2
by: Lukelrc | last post by:
Hi, I have some VBscript that lists the files in a folder. What i want to do is populate an array with the file names and then use that array to populate a list box. I have got as far as...
20
by: andy.rich | last post by:
I am getting the following error and I do not know why. Can anyone help? -------------------------------------------------------- this is what appears on the screen...
5
by: Richard Delorme | last post by:
The n869 draft says: J.2 Undefined behavior The behavior is undefined in the following circumstances: -- An array subscript is out of range, even if an object is ...
8
by: VB Programmer | last post by:
I'm acutally using VB6, not VB.NET, but I couldn't find the newsgroup for version 6.... I need help for something that should be simple. I keep getting a "subscript out of range" error and...
51
by: Pedro Graca | last post by:
I run into a strange warning (for me) today (I was trying to improve the score of the UVA #10018 Programming Challenge). $ gcc -W -Wall -std=c89 -pedantic -O2 10018-clc.c -o 10018-clc...
6
by: josh | last post by:
Hi I've a dubt! when we have overloaded functions the compiler chooses the right being based on the argument lists...but when we have two subscript overloaded functions it resolves them being...
6
by: Andy | last post by:
Hi all, I started developing a little app on my Mac using XCode some month ago. The app is running fine on my mac like a sharm. Now I am nearly ready and yesterday I moved the whole source code...
4
by: Annalyzer | last post by:
Can anyone see what's wrong with this code: Private Sub Command278_Click() On Error GoTo Err_Command278_Click Dim stDocName As String Dim whereArray() Dim stLinkCriteria,...
1
by: tomaz | last post by:
i have an array for each mailbox. if i ask the array of mailbox 1,2,3,4... it returns a "1" if there are unread messages. If there are no unread messages i receive "". (empty) Yet, the moment I...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.