473,394 Members | 1,739 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Problem with referencing items ending in $0 in WebBrowser control

topher23
234 Expert 100+
I'm trying to use a WebBrowser control to automate data entry from our local Access system to the web-based corporate ERP system. Unfortunately, I've run into a snag. Several of the text boxes that I need to populate have names that end in $0 and whenever my code hits one of these, Access goes "bonk!"

Runtime Error 438, Object doesn't support this property or method.

One of the offending code lines is:
Expand|Select|Wrap|Line Numbers
  1. Me.ieBrowser.Document.All.[SN_DATE$0].Value = rs!dtDate
Where ieBrowser is the WebBrowser control, rs is the source recordset for the data being entered and dtDate is a valid Date field.

So far, I've tried a couple of fixes that haven't worked. First, I tried the field name without wrapping it in brackets. Intellisense got all bent out of shape about that. Then I tried finding the Item # and referencing the field indirectly that way, but ran into even more trouble - the page is dynamic, so the Item numbers change depending on data entered.

Any insight here would be most appreciated!
Dec 2 '09 #1

✓ answered by MMcCarthy

Try this and see if it makes any difference ...

Expand|Select|Wrap|Line Numbers
  1. Me.ieBrowser.Document.All.Controls("SN_DATE$0").Value = rs!dtDate
  2.  

3 1867
MMcCarthy
14,534 Expert Mod 8TB
Try this and see if it makes any difference ...

Expand|Select|Wrap|Line Numbers
  1. Me.ieBrowser.Document.All.Controls("SN_DATE$0").Value = rs!dtDate
  2.  
Dec 2 '09 #2
topher23
234 Expert 100+
Thanks, Mary! Although Document doesn't have a Controls collection, that made me think to use:
Expand|Select|Wrap|Line Numbers
  1. Me.ieBrowser.Document.All.Item("SN_DATE$0").Value = rs!dtDate
which worked! You've saved me a lot of headache - I proposed this project, and if it had failed management would have been very unhappy.
Dec 2 '09 #3
MMcCarthy
14,534 Expert Mod 8TB
No problem. I often find an indirect string refernce bypasses issues that arise with the use of names.

Glad it put you on the right track.

Mary
Dec 2 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: CDWaddell | last post by:
I have the following cod private void btnUpdate_Click(object sender, System.EventArgs e TextBox tbMembers = new TextBox() tbMembers = (TextBox) dlClubs.FindControl("tbMembers") string...
0
by: Robin Tucker | last post by:
Hi there, I would like to handle and "pass on" events occuring from items in a web page hosted in the WebBrowser control. Does anyone have any information on how to do this? Thanks
7
by: Mike | last post by:
Hi! I posted this question in browser_ctl group as well but got no results. I have a form with embedded WebBrowser. Upon clicking on a link in the embedded webbrowser that calls JavaScript's...
0
by: Jim Hubbard | last post by:
How would I implement the IDispatch interface to handle the following in VB.Net <BEGIN> Controlling Download and Execution The WebBrowser Control gives you control over what it downloads,...
2
by: Miguel | last post by:
Hi, I'm developing an application in C# with Windows Forms for my company that is similar to the MSN Messenger. This application uses a webservice for registering users, etc... and as 2...
19
by: Blair P. Houghton | last post by:
I'm just learning Python, so bear with. I was messing around with the webbrowser module and decided it was pretty cool to have the browser open a URL from within a python script, so I wrote a...
7
by: msdev | last post by:
Hello, I am creating my own webbrowser to learn VB .Net. I am stuck on an issue with regards to dynamically-created controls, in this case tabs on a tabcontrol and webbrowsers created within...
12
by: Alex Clark | last post by:
Greetings, (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs). I've decided to take advantage of the layout characteristics of HTML documents to simplify my printing tasks, but...
1
by: yoknows | last post by:
Hello .Net Gurus. This is my first post here so I apologize in advance if I have not provided the right information. I hope someone has seen this problem before and can tell me what I am doing...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.