<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Access to an Access DB #2</title><link>https://www.infopathdev.com:443/forums/thread/2316.aspx</link><pubDate>Thu, 04 May 2006 13:48:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2316</guid><dc:creator>Jerry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2316.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2316</wfw:commentRss><description>Sorry Matt.... since I'm new to Infopath and XML, I have no idea as to what I'm looking for by using the alert functions you suggested in your last reply.  I checked, double and triple checked the steps of your tutorial, but it does not work. I still get the error message &lt;br /&gt;"Object required".  Referring to the link below...  regarding populating fields from a drop-down selection...this is what I want to do, but in this reference the data to be populated is in the XML code, not a DB.  I do not want to have to key the data into the XML code, instead I want to pull it out of the DB.  In the example below, what would I have to change to access the database?&lt;br /&gt;&lt;br /&lt;a target="_blank" href=http://infopathdev.com/howto/tutorials/default.aspx?i=9111ef580f95479890fc18fb2c5bac85&gt;http://infopathdev.com/howto/tutorials/default.aspx?i=9111ef580f95479890fc18fb2c5bac85&lt;/a&gt;&lt;br /&gt;</description></item><item><title>Re: Access to an Access DB #2</title><link>https://www.infopathdev.com:443/forums/thread/2315.aspx</link><pubDate>Tue, 02 May 2006 14:11:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2315</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2315.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2315</wfw:commentRss><description>This could mean only one thing: That your XPath is failing in the selectSingleNode() function.&lt;br /&gt;&lt;br /&gt;Here are some tips for debugging the XPath, all of these can be examined via Alert()&lt;br /&gt;eventObj.Source.nodeName&lt;br /&gt;eventObj.Source.nodeType&lt;br /&gt;eventObj.Source.parentNode.nodeName&lt;br /&gt;eventObj.Site.nodeName&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Also, be sure to look at the context of the button to make sure that the XPath is appropriate. I hope this helps, let us know if there are any more problems!</description></item><item><title>Re: Access to an Access DB #2</title><link>https://www.infopathdev.com:443/forums/thread/2314.aspx</link><pubDate>Tue, 02 May 2006 13:58:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2314</guid><dc:creator>Jerry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2314.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2314</wfw:commentRss><description>Hi Matt....  I'm just trying to execute your tutorial exactly.  I made the code modification as you suggested, but am still getting the error.  Line 27....  Object Required.  Below is line 27 of the code..&lt;br /&gt;&lt;br /&gt;XDocument.UI.Alert( eventObj.Source.selectSingleNode("@CustomerID").text );</description></item><item><title>Re: Access to an Access DB #2</title><link>https://www.infopathdev.com:443/forums/thread/2313.aspx</link><pubDate>Tue, 02 May 2006 01:46:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2313</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2313.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2313</wfw:commentRss><description>Are you trying to recreate the form from the tutorial? If you followed the steps exactly, the code should work (I still have my XSN that I made for that HowTo if you want it). Or are you trying to apply the HowTo to your own situation?&lt;br /&gt;&lt;br /&gt;Either way, it sounds like you are getting an XPath error so that selectSingleNode returns a null object. As a quick test update your code for the following and tell me where the error occurs:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;// The following function handler is created by Microsoft Office InfoPath.&lt;br /&gt;// Do not modify the name of the function, or the name and number of arguments.&lt;br /&gt;//=======&lt;br /&gt;function btnViewDetail::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;var oQueryId = XDocument.DOM.selectSingleNode&lt;br /&gt;("/dfs:myFields/dfs:queryFields/q:Customers/@CustomerID" );&lt;br /&gt;XDocument.UI.Alert( oQueryId.text );&lt;br /&gt;XDocument.UI.Alert( eventObj.Source.selectSingleNode("@CustomerID").text );&lt;br /&gt;oQueryId.text = eventObj.Source.selectSingleNode("@CustomerID").text;&lt;br /&gt;XDocument.Query();&lt;br /&gt;XDocument.View.SwitchView("Detail");&lt;br /&gt;} &lt;/pre&gt;&lt;br /&gt;</description></item><item><title>Access to an Access DB #2</title><link>https://www.infopathdev.com:443/forums/thread/1275.aspx</link><pubDate>Mon, 01 May 2006 21:17:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:1275</guid><dc:creator>Jerry</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/1275.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=1275</wfw:commentRss><description>My original question was about how to read an Access database and pull data from it and insert the data into specific fields in the InfoPath form.  Matt Faus, gave me the following link, and I was able to follow the instructions; however, something appears to be wrong with the code for the 'Button' called View Details.&lt;br /&gt;&lt;br /&lt;a target="_blank" href=http://infopathdev.com/howto/tutorials/default.aspx?i=0bb37b4de44348408680a53a449f2353&gt;http://infopathdev.com/howto/tutorials/default.aspx?i=0bb37b4de44348408680a53a449f2353&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I get an error message which says... "Object required". There must be something wrong with the code? Line 24... where it starts out as "oQueryID.text = eventObj.Source.selectSingleNode...&lt;br /&gt;&lt;br /&gt;// The following function handler is created by Microsoft Office InfoPath.&lt;br /&gt;// Do not modify the name of the function, or the name and number of arguments.&lt;br /&gt;//=======&lt;br /&gt;function btnViewDetail::OnClick(eventObj){var oQueryId = XDocument.DOM.selectSingleNode&lt;br /&gt;("/dfs:myFields/dfs:queryFields/q:Customers/@CustomerID" );&lt;br /&gt;oQueryId.text = eventObj.Source.selectSingleNode("@CustomerID").text;&lt;br /&gt;XDocument.Query();&lt;br /&gt;XDocument.View.SwitchView("Detail");} &lt;br /&gt;&lt;br /&gt;What am I doing wrong?  &lt;br /&gt; &lt;br /&gt;</description></item></channel></rss>