Microsoft Knowledge Base Email Alertz

(891771) - Describes a problem that occurs in InfoPath 2003. You cannot add a picture control to a non-repeating field in a repeating group in an InfoPath 2003 form.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 891771 - Last Review: September 22, 2011 - Revision: 4.0

You receive "A picture control must be bound to a non-repeating field with a picture data type" error message when you try to embed a picture control in InfoPath 2007 or in InfoPath 2003

On This Page

SYMPTOMS

You cannot insert a picture control that is not bound to a non-repeating field in a repeating group in a Microsoft Office InfoPath 2007 form or in a Microsoft Office InfoPath 2003 form. When you try to bind a picture control to a repeating field in a repeating group, you receive the following error message:
A picture control whose picture is included in the form must be bound to a non-repeating field with a picture data type. If the field is part of a repeating group, then the picture control must be inside a repeating table or repeating section that is bound to that group.


Note An example of a repeating field in a repeating group is a repeating table.

CAUSE

This problem occurs when you try to bind a picture control to a field of type "simpleType" and not to a field of type "base64." You try to do this in the source database. A picture control in InfoPath only supports fields of type as follows:
  • base64
  • Other picture data types

WORKAROUND

To work around this problem, you can insert a picture as a static image in the repeating table. The picture that you want to add to the repeating table must be available as a file outside the data source. To insert a picture as a static image in the repeating table, follow these steps.

Note Because the picture is a static element, the picture is visible at all times. The picture is visible both before you run a query and after you run a query on the repeating group. The picture does not change based on the results of the query.
  1. Put the insertion point where you want the picture to appear in the repeating group.
  2. Click Insert, point to Pictures, and then click From File.
  3. Locate the picture that you want to insert, and then click Insert.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to reproduce the problem

  1. Start InfoPath 2003 Service Pack 1.
  2. On the File menu, click Design a Form.
  3. In the Design a Form pane, click New from Data Connection.
  4. On the Data Connection Wizard page, click Database, click Next, and then click Select Database.
  5. In the Select Data Source dialog box, click New SQL Server Connection.odc, and then click Open.
  6. In the Connect to Database Server dialog box, type your Server name and your Log on credentials, and then click Next.
  7. In the Select Database and Table dialog box, click Northwind in the drop-down list, click Categories in the list of tables, and then click Finish.

    Note If you do not use Windows authentication in step 6, you are prompted to enter your password here.
  8. Click Next, and then click Finish to complete the Data Connection Wizard.
  9. In the Data Source pane, add the queryFields folder to Drag query fields here on the form, and then click Section with Controls.
  10. In the Data Source pane, add the dataFields folder to Drag data fields here on the form, and then click Section with Controls.
  11. Delete the default text box that is inserted under the Picture category heading tag.
  12. Click Controls in the task pane. Add the Picture control to the Picture category heading tag and to the repeating table.
  13. In the Insert Picture Control dialog box, click Included in the form, and then click OK.
  14. Expand Categories, click Picture, and then click OK.

    You receive the error message that is mentioned in the "Symptoms" section.

APPLIES TO
  • Microsoft Office InfoPath 2007
  • Microsoft Office InfoPath 2003
Keywords: 
kbquery kbgraphic kbcontrol kbtshoot kbprb KB891771
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate