Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8813747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:56:12+00:00 2026-06-14T03:56:12+00:00

I’m using Access VBA to open Internet Explorer and fill out a form on

  • 0

I’m using Access VBA to open Internet Explorer and fill out a form on a website.
This form has id of auto number which changes every so often but “_id” as per below is always the same, and I’m not sure if or how I can use the “_id” to insert the value into that field

this is what i have so far, thanks Tim
im not sure how exactly this site works as im fairly new here but this is what i have so far, one last question on Radio Buttons

Dim ie As InternetExplorer
Dim url As String
Dim htmlDoc As MSHTML.HTMLDocument ' html object lib
Dim htmlInputElemen As MSHTML.HTMLInputElement
Dim htmlElementCol As MSHTML.IHTMLElementCollection

url = www.abc.com
ie.navigate url
‘ this is for text box
Set htmlDoc = ie.Document
Set htmlElementCol = htmlDoc.getElementsByTagName("INPUT")
    For Each htmlInputElemen In htmlElementCol
        If htmlInputElemen.getAttribute("title") = "myTitle" Then
            htmlInputElemen.Value =  “myTitle”
'       ElseIf htmlInputElemen.getAttribute("title") = "myTitle2" Then
            htmlInputElemen.Value = “myTitle2”
        End If
   Next htmlInputElemen
‘ this is for combo box
Set htmlElementCol = htmlDoc.getElementsByTagName("select")
Dim htmlSelectElem As MSHTML.HTMLSelectElement
    For Each htmlSelectElem In htmlElementCol
        If htmlSelectElem.getAttribute("title") = "myComboBox" Then
            htmlSelectElem.Value = “myComboBoxValue”
        End If
    Next htmlSelectElem

‘now I have radio buttons which im not sure how to click using title, any ideas?
I tried this but no luck
Set htmlElementCol = htmlDoc.getElementsByTagName("span")
Dim htmlSpanElem As MSHTML.HTMLSpanElement
    For Each htmlSpanElem In htmlElementCol
        If htmlSpanElem.getAttribute("title") =  “ABC” Then
            htmlSpanElem.Click
        End If
    Next htmlSpanElem

<span class="ms-RadioText" title="ABC">
<input id="234sd87s89df">
<label for="234sd87s89df ">ABC</label>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:56:13+00:00Added an answer on June 14, 2026 at 3:56 am
    Dim inputs, el
    
    Set inputs = document.getElementsByTagName("input")
    
    For Each el In inputs
        If el.getAttribute("_id") = "R_Destination" Then
            el.Value = "myValue"
            Exit For
        End If
    Next el
    

    EDIT: here’s the same code refactored as a function

    Function GetElement(doc as object, tagName As String, attrName As String, _
                                          attrValue As String) As Object
        Dim rv As Object
        Dim elements, element
    
        Set inputs = doc.getElementsByTagName(tagName)
    
        For Each element In elements
            If element.getAttribute(attrName) = attrValue Then
                Set rv = element
                Exit For
            End If
        Next element
    
        Set GetElement = rv
    
    End Function
    

    Usage:

    Dim el
    Set el = GetElement(document, "input", "_id", "R_Destination")
    if not el is nothing then el.value = "myValue"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I know there's a lot of other questions out there that deal with this
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.