File Attachment Infopath

I am creating a form in Infopath based on a MS Access database. I am trying to add a file attachment control on the form but I keep getting the following error: "A file attachment must be bound to a non repeating field with a picture or a file attachment data type. If the field is part of a repeating group, then the file attachment control must be inside a repeating table or repeating section that is bound to that group." I tried changing the data type in the database to OLE object but Infopath does not support large binary fields.

How can I add a field attachment control to my form?
Kimberly1467Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

melli111SharePoint Administrator / DeveloperCommented:
Do you actually need the file attachment to go to SQL?
I have tons of fields on my form that are just used in the form, not passed to SQL (such as my file attachments).
Here's what you do:
Open your datasource window
Right click on the top of your data structure (i.e. datafields or something to that affect)
Click Add
Add a name (like "Attachments" - this is going to be a group to house attachments)
For Type select "Group"
Click OK
Right Click on the new group "Attachments"
Click Add
Enter "Attachment1" as the field name
For the datatype choose "Picture or file attachment (base64)
Click ok
Use this field as your attachment field (you can drag and drop it onto your form)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
melli111SharePoint Administrator / DeveloperCommented:
I'm glad that worked for you  :)
***In case your users come up with the request that they want to attach more than just 1 file attachment (which is common) here's what you can do:
Right Click on your Attachment field
Properties
Check the box for "Repeating"
Delete the old field on the form and drag and drop this one onto your form and select "Repeating table" when it asks you.

(That way you don't have to create a ton of attachment fields)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
InfoPath

From novice to tech pro — start learning today.