Hello,
If the form is showing an error while loading, then there is some problem with the data source which is set up to ‘Automatically retrieve data when form is opened’. I'd suggest that you check your data connections and uncheck that option if you don't need to query on load. That will also help if the form is being slow.
What error do you get when publishing to SharePoint?
Thanks,
Jo-Anne