InfoPath cannot open the selected form.

F

FrankS

Vista, VS2005, InfoPath 2007, SQL2005, managed VB, full trust
Erroneous error, “InfoPath cannot open the selected form.†This IS NOT the
“InfoPath cannot open the selected form because of an error in the form’s
code†error. With full trust and code that has been working for some time,
throws this error for no apparent reason. The only way around it seems to
rebuild the whole project from scratch. This sometimes happens after a
Convert New Data Source with revised schema. The schema is fine and can be
used without issue in other form. Sometimes restarting VS005 will resolve it
and sometimes NOTHING will resolve it. However if a new project is created
with the exact same schema and code, everything it works fine. Any ideas
would be welcome. Thanks, Frank.
 
D

David Dean

This error may occur after you launch an XSN file with the same form ID as
the form template in your Visual Studio project. The XSN file is cached on
your hard disk, but with default XML that doesn't conform to your current
schema.

Workaround - close down VS2005 and double-click manifest.xsf in the InfoPath
Form Template subfolder within your project folder. Answer YES to the big
warning box that pops up. Then close down InfoPath and reopen your project in
Visual Studio. You should now be able to run the form in Preview mode from
VS2005.
 
F

FrankS

Thanks Dave. It cleared the error and I was able tp open the form in VS2005
again. Is there a way to clear the cache "manually" (by command?) to avoid
this type error? Thanks again for the qucik response!
 
D

David Dean

Try using the following command to clear the form template cache:

"C:\Program Files\Microsoft Office\Office12\InfoPath.exe" /cache ClearAll
 
F

FrankS

Thanks Dave. Have a nice day!

David Dean said:
Try using the following command to clear the form template cache:

"C:\Program Files\Microsoft Office\Office12\InfoPath.exe" /cache ClearAll
 
M

Mayur

HI Dave

I am facing the same issue. Form was working fine, after I made some changes
in form, I am getting this error while previewing the form. I tried clearing
cache using the command and opening manifest.xsf. It previewed when I double
clicked the manuifest but then I opened manifest indesign mode and then tried
to preview, it again gave me error. Any Idea what shall I do?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top