Solved

Microsoft Infopath 2003 - Attach File Control

Posted on 2008-06-23
10
1,195 Views
Last Modified: 2011-10-19
I have designed an Infopath form to collect information from principal Investigators in which the input will be submitted to a Access relational database via a sharepoint site.  I would like to place a Save (not Submit) button on the form for saving the form to sharepoint and I would like to use the information in the first field on the form for the saved file name. The script langauge is VBScript.
I will go to sharepoint later and open any saved files and then submit them to an Access database after I have verified the form data.

Also at the bottom of the form you will see the text  "Add file Attachment".
When I click on the file attachment control, Infopath asks for which field to bind the attachment. I don't have a field for the attachment. The attached file is for information that the Principal Investigator may want to relay to me but will not be submitted to the Access database.

A form was first created with JSscript as the programming language and I was able to get the attachment control  on the form without binding to a field. However, if I delete the attachment and try to add a new attachment, Infopath wants to know what field to bind the control. I don't know how I got the attachment on the form in the first place without asking for a binding field.

Anyway, I now have a VBScript form in which I want to add a save button and add an attachment control.

6-23-2008-10-21-21-AM.png
0
Comment
Question by:Mohlerp1942
  • 7
  • 3
10 Comments
 
LVL 28

Expert Comment

by:clayfox
ID: 21852812
As you have found, basic database forms have some limitations like no large file types.

SQL or SQL Express with web services is the best practice. This allows you to dynamicly query and submit to multiple tables and work with large file types over 255 characters.

Check out the web services suite from Qdabra Software. www.qdabra.com
0
 

Author Comment

by:Mohlerp1942
ID: 21856497
The first go around at designing this form allowed me to place an attachment control on the form.
The attachment does not get submitted to the Access database. It is just an attachment that has additional information about the form data. All the other data you see on the form will submit to the database.
 I could use the form with the attachment but the editor being used is for JScript language which I do not know. That is why I duplicated this form with VBscript as the editor language. This form though will not allow me to add a attachment control without specifying a field from the database.

If I knew how to switch from JScript to VBscript on the first design I could use that form. I wanted to add a save form button at the bottom of the form. Could not get that to work either, maybe it can't be done.
0
 
LVL 28

Expert Comment

by:clayfox
ID: 21863141
You should be able to create a field in your main dom which can contain the attachment, provide the binding.
Only the Data fields node will be submitted to Access.
You can place a button where ever and create a submit data connection.

I would look at doing it with the designer UI.  Often people make things more complex by trying to code things that can be done directly.
0
 

Author Comment

by:Mohlerp1942
ID: 21886760
Your file attachment suggestion worked.  Thanks

I placed a button on my form but the only option that I can see was to Submit the data. I olny want to save the form to a Share point without submitting.

I know I can save using the Save option on the File menu but, I would like to make it simple for the users of the form by using a save button and having code that would use the RMA number field from the form for the file name.
0
 
LVL 28

Assisted Solution

by:clayfox
clayfox earned 250 total points
ID: 21889358
If you create a submit to SharePoint you can specify the file name and it pretty much the same as save.

So create your submit to the document library.
Then submit to the DC with your action
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:Mohlerp1942
ID: 21903208
I will try your solution when I get back to work Tuesday.
0
 

Author Comment

by:Mohlerp1942
ID: 21908982
Your solution did allow me to save the file to sharepoint.
After I saved the file to sharepoint I opened the file and tried to submit the data to my access database.
The problem is the Submit button has been grayed out so I have no way of getting the data into my access database.
How do I get the data subitted to my Access database?
0
 

Author Comment

by:Mohlerp1942
ID: 21920005
Maybe my question was not stated correctly. I want the person filling out the form to use a Save button to save the form to a SharePoint Document Library. I will later reopen the form and review the user input and then Submit the data to an Access database. One of the reasons the user can not submit the data is users will not have read/write permission to where the Access database resides.
0
 

Accepted Solution

by:
Mohlerp1942 earned 0 total points
ID: 22000985
I am still waiting for a reply to my question.
0
 

Author Comment

by:Mohlerp1942
ID: 22152996
No Reply to last question.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now