Solved

Microsoft Infopath 2003 - Attach File Control

Posted on 2008-06-23
10
1,207 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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.

733 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