How to display IP address of a PC in form?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • neelsfer
    Contributor
    • Oct 2010
    • 547

    How to display IP address of a PC in form?

    Has anybody got code/module to display the IP address of a computer on a form?
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    You mean for the computer that's running the database? You could use a WMI query but I think the user needs administrative access to the computer he's on. But I'm not certain about that.

    Comment

    • neelsfer
      Contributor
      • Oct 2010
      • 547

      #3
      yes the current pc wher application is loaded on

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        You could use a WMI query but I think the user needs administrative access to the computer they're on. But I'm not certain about that.

        Comment

        • colintis
          Contributor
          • Mar 2010
          • 255

          #5
          I have found a tutorial in HERE.
          You can try simply copy & paste & test the code first, then modify it to your needs.

          Comment

          • neelsfer
            Contributor
            • Oct 2010
            • 547

            #6
            Thx it works manually. How do i display the IP address in a textbox on a form, using this code.

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32633

              #7
              I think the first thing to understand is that there is no single IP address of a PC. There can be various ones (See the helpful linked article from post #5). When you know which IP address you are after you can amend the procedure to filter for that specific one and convert it to a function to return the value in strIPAddresses.

              Comment

              Working...