Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Microsoft Infopath 2003 - Attach File Control

Posted on 2008-06-23
10
Medium Priority
?
1,217 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
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
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.

636 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