I know this post is 5 years old, but I'm having this exact same issue with InfoPath 2010 on Windows 7. Did you ever resolve your problem? I've tried reinstalling VSTA, uninstalling Office SP1, reinstalling Office, reinstalling the .NET framework, and nothing resolves the issue.
I can create VSTA code in a new InfoPath form, but as soon as I save and close the form, if I try to reopen the code in VSTA InfoPath errors out with the message "Microsoft InfoPath has stopped working" and the following error in the event log:
Log Name: Application
Source: Application Error
Date: 6/4/2012 1:51:05 PM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer:
Description:
Faulting application name: INFOPATH.EXE, version: 14.0.6009.1000, time stamp: 0x4cc1c519
Faulting module name: IPDESIGN.DLL, version: 14.0.6016.1000, time stamp: 0x4d2e0fda
Exception code: 0xc0000005
Fault offset: 0x0041e13c
Faulting process id: 0x1050
Faulting application start time: 0x01cd4293bf787d19
Faulting application path: C:\PROGRA~2\MIC30F~1\Office14\INFOPATH.EXE
Faulting module path: C:\Program Files (x86)\Microsoft Office 2010\Office14\IPDESIGN.DLL
Report Id: 002aa6d9-ae87-11e1-b395-90ccacc10089
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2012-06-04T20:51:05.000000000Z" />
<EventRecordID>70539</EventRecordID>
<Channel>Application</Channel>
<Computer></Computer>
<Security />
</System>
<EventData>
<Data>INFOPATH.EXE</Data>
<Data>14.0.6009.1000</Data>
<Data>4cc1c519</Data>
<Data>IPDESIGN.DLL</Data>
<Data>14.0.6016.1000</Data>
<Data>4d2e0fda</Data>
<Data>c0000005</Data>
<Data>0041e13c</Data>
<Data>1050</Data>
<Data>01cd4293bf787d19</Data>
<Data>C:\PROGRA~2\MIC30F~1\Office14\INFOPATH.EXE</Data>
<Data>C:\Program Files (x86)\Microsoft Office 2010\Office14\IPDESIGN.DLL</Data>
<Data>002aa6d9-ae87-11e1-b395-90ccacc10089</Data>
</EventData>
</Event>