Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2004
    Posts
    139

    Unanswered: Search on the internet from form

    I have a form that contains a field with a part number. I would like to add a button on the form that would connect with the internet and automatically search for that part number. I am very new to Access and I know this might be difficult but any ideas??

    Any suggestions are appreciated!
    B&R

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    That's a pretty broad statement you just made there... there's about 1,342,341,210.007 ways to "search on the internet". Perhaps you could be a bit more specific?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Feb 2004
    Posts
    139
    Teddy - Your right! I am very new to programming. I thought if it could open up using Internet Explorer and then paste the part number from the field into the search field and then activate the search. Whatever we receive from that is what I wanted. I am sure you can do it but how is the question.

    Thanks,
    B&R

  4. #4
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    Well, using a neat little trick posted HERE for creating a button that will use the internet to map a location, you could use this code behind a command button to use Google to search for your field:
    Code:
    Dim strSearch As String
        If Len(Me.txtPN & "") > 0 Then
            strSearch = "http://www.google.com/search?hl=en&q=" & Me.txtPN & "&btnG=Google+Search"
            Application.FollowHyperlink (strSearch)
        End If
    This assumes the value in txtPartNumber does not have and spaces. An extra few steps would be necessary to change the url to accomodate spaces.

    have fun,
    tc

  5. #5
    Join Date
    Feb 2004
    Posts
    139
    TC -

    Thanks for your suggestion! I am trying to make it work and having a little trouble. The name of my text box is prodid. I created a command button and then put your code in the on click event. I changed the PN in your code to prodid and it keeps stopping there with the following message:
    "method or data member not ". Could you please let me know how to change the code to accomodate my text box named prodid?

    Appreciate all your help, obviously I am a beginner!

    B&R

  6. #6
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    If your textbox is named prodid then anyplace I used Me.txtPN should read Me.prodid instead.

    The error message means the name you have in the code doesn't exist in the form.

    tc

  7. #7
    Join Date
    Apr 2006
    Location
    Huddersfield, UK
    Posts
    154

    Wink

    Dunno if this would help you, but, it is a access form web browser. I supposue you may be able to add in your other form as a subform and paste the field over into the browser....

    Hope it helps;

    Dan ;-)
    Attached Files Attached Files
    sometimes simple is best.... and i'm just a simple fellow.

  8. #8
    Join Date
    Feb 2004
    Posts
    139
    Thanks for the help!! Your code worked beautifully. I appreciate your patience with a beginner and hope that others will find this great solution to what I thought was a difficult problem.

    B&R

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •