Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ms acces and web application

Status
Not open for further replies.

Omar2009

IS-IT--Management
Nov 6, 2008
3
US
Hello ,

I need to use Ms access 2003 to populate a table with Incoming feed information that resides on a web application. The process to get this information is like follows
• Click a button on a form to open internet explorer and to navigate to the web application
• Enter user name and password … I like to have this information – the user name and password- on a text file somewhere on my computer that are feed into the fields- for security reasons
• After logging in I look for a hyperlink called [RISC] and click on it
• The next page after loading has a hyperlink called [data] and click on it
• This page has my information. It has many feed names. I am interested in the feeds that has [reformatted.latest.in] in the name of the feed.
• Now. Every feed name that has the [reformatted.latest.in] is a hyperlink that when you click it ,it will take you to the individual files for that feed. Two types of files , one is .txt and the other is .ok
• I need to gather the [feed name]. [File name], [Size], [Date].

It sound complicated but its not . I have some part of the code working . I don’t know if there is a better way . I really do appreceate any help

So its .. Login .. Click on RISC .. Click on data.. looping through feed names and finding [xxxx reformatted.latest.in] …Click on it … loop in to capture [File name], [Size], [Date]

My Code ===========================================
Code:
Private Sub Command0_Click()
                                                            '==== need help to login
Dim temp

    Set o2 = CreateObject("internetexplorer.application")
        o2.navigate "[URL unfurl="true"]https://fcdev.cibcwm.com/"[/URL] 'IE navigates to a webpage
        o2.Visible = True
        While o2.Busy: DoEvents: Wend
 
Set o = o2.Document.all.tags("A")
M = o.length: mySubmit = -1   
   
'==== I wish i can find a more effecent way to find my link and click on it

For r = 0 To M - 1


If InStr(1, o.Item(r).innerHTML, "RISC", vbTextCompare) Then
    o.Item(r).focus
    o.Item(r).Click: Exit For
    
End If

  Debug.Print o.Item(r).innerHTML
  Debug.Print o.Item(r).innerText
Next

Set o = o2.Document.all.tags("A")

E = o.length: mySubmit = -1
For c = 0 To E - 1


If InStr(1, o.Item(c).innerHTML, "data", vbTextCompare) Then
    o.Item(c).focus
    o.Item(c).Click: Exit For
    
End If

  Debug.Print o.Item(c).innerHTML
  Debug.Print o.Item(c).innerText

Next


Set o = o2.Document.all.tags("A")

F = o.length: mySubmit = -1
For x = 0 To F - 1
  
  
  If InStr(1, o.Item(x).innerHTML, "reformatted.latest.in", vbTextCompare) Then
    o.Item(x).focus
   
   Name1 = o.Item(x).innerText            '=== Need help here  to loop through all hyperlinks
   
   
   
   Debug.Print o.Item(x).innerHTML
   Debug.Print o.Item(x).innerText
 
 o.Item(x).Click
 
 End If
   Debug.Print o.Item(x).innerHTML
   Debug.Print o.Item(x).innerText
 
 Next
o2.Quit
Set o2 = Nothing
End Sub
 
I thing I overwhelmed any one who wants to help me solve my problem. Just help me figure out how to log in the web site and I will try to figure out the rest. The code on the login page is






<!-- Login Info -->
<br>
<a class="TextBold">
<!--STTAG-->Name:
</a>

</td>
<td align="left" width="88%"><br>&nbsp;&nbsp;&nbsp;<INPUT LENGTH="10" SIZE="15" NAME="user" TYPE="text">
</td>
</tr>

<tr>
<td align="right" width="12%">
<!-- Password Info --> <br>


<a class="TextBold">
<!--STTAG-->Password:
</a>

</td>
<td align="left" width="88%">
<br>&nbsp;&nbsp;&nbsp;<INPUT LENGTH="10" SIZE="15" NAME="password" TYPE="password">


</td>

</tr>

<tr>
<td align="right" width="12%">&nbsp;</td>
<td valign="top" align="left" border="0" cellpadding="0" cellspacing="0" width="88%">
<!-- Submit Info -->
 

That does not look like any VBA code to me - try other forums, for HTML maybe....?

Have fun.

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top