?
Solved

Microsoft Infopath 2003 - Attach File Control

Posted on 2008-06-23
10
Medium Priority
?
1,212 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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 1000 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

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Suggested Courses

752 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