473,549 Members | 3,109 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with referencing items ending in $0 in WebBrowser control

topher23
234 Recognized Expert New Member
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
3 1878
MMcCarthy
14,534 Recognized Expert Moderator MVP
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 Recognized Expert New Member
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 Recognized Expert Moderator MVP
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
5192
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 sqlUpdate = "UPDATE tblClub SET "
0
1039
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
6513
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 window.open() call where I pass different width, height, top, left and other parameters, I open a new form of the same type as the original. I noticed...
0
3447
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, displays, and executes. To gain this control, you need to implement your host's IDispatch so it handles DISPID_AMBIENT_DLCONTROL. When the WebBrowser...
2
5691
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 webbrowser controls on it. Besides that i'm using the firewall client for isa server 2004 and it seems that the browsers aren't able to pass thru it... if i...
19
2346
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 short script to open a local file the same way, using the script file as an example target: # browser-test.py import webbrowser import sys
7
2550
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 each new tab. Using AddHandler in a class, I can get the delegate Sub to display the name of the webbrowser that has been clicked (by using...
12
6339
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 of course it's thrown up a whole host of new issues... I'm generating a multi page printable document in HTML from my app, and displaying it in a...
1
4009
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 wrong. I have simplified the problem with the following example: Using asp.net 2.0, I have a Master page template used on default.aspx. >From...
0
7446
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7718
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7956
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7470
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6041
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5088
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1936
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
763
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.