Solved

Microsoft Infopath 2003 - Attach File Control

Posted on 2008-06-23
10
1,198 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

863 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

19 Experts available now in Live!

Get 1:1 Help Now