hi could anyone help me come out of this problem.. I've my project with one mdi and three child forms.. when i run the mdi child forms vb6 stops working and it shows the following:

Problem signature:
Problem Event Name: APPCRASH
Application Name: vb6.exe
Application Version: 6.0.81.76
Application Timestamp: 3592011f
Fault Module Name: StackHash_7e3b
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 00000000
Exception Code: c0000005
Exception Offset: 00000000
OS Version: 6.1.7600.2.0.0.256.1
Locale ID: 16393
Additional Information 1: 7e3b
Additional Information 2: 7e3beb1e9ccf6d519c5b994ca59a280f
Additional Information 3: 7b83
Additional Information 4: 7b833c57ebcf54809fd3aaccd8ea4f46

Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt

Recommended Answers

All 12 Replies

Bad news, I know, but you will have to re-install vb6 and then start again.

Save all your projects, un-install vb6 and then re-install.

Good luck bud.

but all other vb projects r working properly

Then you need to try to debug the part of the code that is causing the crash.

Comment the blocks of the code and check one by one.

As Das said, post the code you have when it is crashing. Did you by any chance used code that reads or write to your registry? This is a common mistake, If coders do not know what the code is all about, the registry gets mixed up and crashes yoiur app OR your system.:)

Post some code so we can have a look.

REPORTS ON THE PROJECT ARE WORKING BUT THE CHILD FORMS CAUSE THE ERROR
THIS IS THE CODE OF THE CHILD FORM

Dim db As Database
Dim rs As Recordset
Dim control As control

Private Sub ADD_Click()
Data1.Recordset.AddNew
MsgBox "ENTER THE DATA FOR NEW RECORD"
Text1.SetFocus
End Sub


Private Sub CLEAR_Click()
For Each control In Form1.Controls
If TypeOf control Is TextBox Then
control.Text = " "
End If
Next control
End Sub

Private Sub DELETE_Click()
rs.DELETE
MsgBox "RECORD DELETED"
If Not rs.BOF Then
rs.MoveFirst
Else
rs.MoveNext
End If
End Sub

Private Sub EXIT_Click()
Unload Me
End Sub

Private Sub Form_Load()
Me.WindowState = 2
Set db = OpenDatabase("G:\CARDEALERS.mdb")
Set rs = db.OpenRecordset("SELECT * FROM PURCHASE")
End Sub

Private Sub REPAIR_DETAILS_Click()
Form3.Show
End Sub

Private Sub Text21_GotFocus()
Text21.Text = Val(Text20.Text) + Val(Text19.Text) + Val(Text18.Text) + Val(Text17.Text)
End Sub

Private Sub UPDATE_Click()
rs.Edit
rs.UPDATE
MsgBox "RECORD UPDATED SUCCESSFULLY"
End Sub
Private Sub ADD_Click()
Data1.Recordset.AddNew 'This is your first mistake. You are trying to add a record, nothing to add, no 'Update', then you set focus to the textbox for the user to complete. It works the other way around - set focus, user adds something, then add the new record, then update it.
MsgBox "ENTER THE DATA FOR NEW RECORD"
Text1.SetFocus
End Sub

Private Sub CLEAR_Click()
For Each control In Form1.Controls
If TypeOf control Is TextBox Then
control.Text = vbNullString 'is the correct way, not ""
End If
Next control
End Sub

The rest seems fine, not sure why it is crashing. It must be code from your main mdi form.

Please post the code under the main form as well, thanks.

this the code of my mdi form

Private Sub EXIT_Click()
End
End Sub

Private Sub MDIForm_Load()
Me.WindowState = 2
End Sub

Private Sub PUR_REPORT_Click()
DataReport1.Show
End Sub

Private Sub REPAIR_Click()
Form3.Show
Me.WindowState = 2
End Sub

Private Sub SALE_REPORT_Click()
DataReport2.Show
End Sub

Private Sub SOLD_Click()
Form2.Show
Me.WindowState = 2
End Sub

Private Sub STOCK_Click()
Form1.Show
Me.WindowState = 2
End Sub

There is no code suggesting such a serious error. If at all possible, start a new project and copy your code over to it and then run the new project to see if the error is generated again.

I know it sounds like a lot of work, but it seems that there is an internal problem which might be solved if running a new app., especially if other projects are running fine.

thanks for your kind help i'll try creating a new app

regards
jaai

No problem. Please mark this as solved. If you get errors in the new app, please open a new thread. I'll link the two then, thanks.:)

when i create data report (not form crystal report) , I add data source from properties
I get error message "VB HAS STOPPING WORKING", when debugging any error message "AN UNHANDLED WIN 32 EXCEPTION IN VB6.EXE [4672]"
Any body can help me please ???

Best regards,
fxeko@yahoo.com

My visual basic on windows 7 is crashing if i copy textbox or label it will stop working and will close what will do to solve the problem

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.