Question : Infopath Multiple-Selection List Box: linked to access and list populated from Access table

I am trying to create a Multiple-Selection list box in InfoPath that is linked to an access db. When I try to add the selection box tells me "A multiple-selection list box control must be bound to a repeating field with a text data type.".

How do I create a repeating field from access. I tried allowing multiple values on the field I am trying to bind the list to in access and this did not work.

Answer : Infopath Multiple-Selection List Box: linked to access and list populated from Access table

In InfoPath data source (main) create a Group . Then add a Text Field below this group and mark that as repeating. Now bind the Multiple selection list box to this text field.

That will fix the above error.

Now if you need to access this field in the code --> From the Data Source, right click on field -- copy XPath. Use this Xpath in the code to get access

Example:

this.CreateNavigator.Select("xpath....", NamespaceManager);

This returns an interator which you can use in a loop to get the values.

(Please check the syntax above for the code)

 

Random Solutions  
 
programming4us programming4us