<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Urgent help!!!!! Fill a list box</title><link>https://www.infopathdev.com:443/forums/thread/97019.aspx</link><pubDate>Tue, 15 Apr 2014 12:17:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:97019</guid><dc:creator>madrid272001</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/97019.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=97019</wfw:commentRss><description>Hi all,

I have been looking for a code that fixes my problem and I can not find a solution.

I have a form with a text box and a list box. What I want is that, everytime I write a text on the textbox, it has to be added to the list box.

I have the next code:

            Dim root2 As XPathNavigator = Me.CreateNavigator()
            Dim nodes2 As XPathNodeIterator = _
            root2.Select(&amp;quot;/dfs:myFields/dfs:dataFields/d:General/d:Gastos_Representacion&amp;quot;, NamespaceManager)

            nodes2.Current.SelectSingleNode(&amp;quot;@Cliente_Representacion&amp;quot;).InsertAfter(empresa_visita)

where &amp;quot;Gastos_Representacion&amp;quot; is a repeating table, &amp;quot;Cliente_Representacion&amp;quot; is the list box and &amp;quot;empresa_visita&amp;quot; is a variable where I load the value of the textbox.

I get an error everytime I execute the form.

Can you please help me???

Thanks in advance for your replies.

Mat.</description></item></channel></rss>