?
Solved

Page fault when adding code

Posted on 2005-03-24
7
Medium Priority
?
154 Views
Last Modified: 2010-05-02
Hello - I'm an ex-mainframe programmer having learned VB on my own. I have a program which works fine and I would like to change the literals on the screens so that the user can choose a language (English, Spanish, etc.) to use. The program works fine, but when I call a subroutine to process nothing but assigns ( A = B, etc.), the program aborts with an invalid page fault. If I do not call the subroutine, the programs works.
It appears to me that I am exceeding a table of sorts, or maybe the limit of some type of memory restrain. I have VB 6 studio, with sp5 and sp6 installed. I'm using indexed and sequential files.

Any suggestions would be much appreciated. Thanks.
0
Comment
Question by:VB6Software
6 Comments
 
LVL 23

Expert Comment

by:gecko_au2003
ID: 13625475
Maybe a post of your sub routine would help because then the experts could possibly see where the sub routine is going wrong ?
0
 
LVL 19

Expert Comment

by:Shauli
ID: 13625490
Ther are several reasons why this can happen. In general it means that you have referred to a memory block (store or call) but the block does not exist. So, pls post the sub code here, and we'll see what we can do.

S
0
 

Author Comment

by:VB6Software
ID: 13636836
Hello -
   I did some research on form loading and it appears that the problem is with too many forms loading. When a caption (or other field) is changed on a form, the form is loaded first and the Form_load subroutine is executed within the form. I have abut 20 forms in the program and that creates a problem. In an effort to get it to work, I tried to load the form, make the assignments, then unload the form - but that action did not retain the assignments. So my solution, though a bit tedious, was to replace any Form.Show statements with a call to a subroutine for that form to make the assignments with the proper language and perform the .show within the subroutine. It works.
One other comment: I found a number of notes from others about quirks concerning Windows 98SE, which I am using. Maybe this would not have happened using XP, but I wanted to make the program versital enough for any Windows version.
Thank you for your notes.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 23

Expert Comment

by:gecko_au2003
ID: 13636892
So you have 20 additional forms that open when you run the first form ie the main window ? ok now I am lost and do not understand why anyone would want that many forms open at once lol
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 14364967
Good information to know, about open form # being a limitation
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 14395795
PAQed with points refunded (250)

modulo
Community Support Moderator
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question