Results 1 to 13 of 13
  1. #1
    Govind is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2012
    Posts
    7

    i want to get ip address in a text box on a form plesse help

    i want to get ip address in a text box on a form plesse help

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Bing: Access VBA show IP address

    Does this help http://www.everythingaccess.com/tuto...f-your-machine
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Govind is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2012
    Posts
    7

    i want to get ip address in a text box

    Quote Originally Posted by June7 View Post
    Bing: Access VBA show IP address

    Does this help http://www.everythingaccess.com/tuto...f-your-machine


    Thank u for ur reply. given link help me to get ip address in a immediate window. but i required the same value to be copy in a text field on a form.

    Thank u in advance.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    As the remark in code says, change the Debug to whatever you want to do with the value. If the procedure is behind the form, something like:

    Me.textboxname = strIPAddress
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Govind is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2012
    Posts
    7
    I tried everything but i don't know where i making mistake. i m attaching the file and request you to please check and rectify.
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Suggest a regular button instead of a toggle.

    Couple ways to fix the code:

    1. Put just the GetIpAddresses sub behind the form. Everything else in general module. Change the Debug.Print line to Me.IP = strIPAddress
    Then code behind form:
    Private Sub IP_Click()
    GetIPAddresses
    End Sub

    2. Put all the code in general module and change Sub GetIPAddresses to Function GetIPAddresses. Change the Debug line to GetIPAddresses = strIPAddress
    Then code behind form:
    Private Sub IP_Click()
    Me.IP = GetIPAddresses()
    End Sub
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Govind is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2012
    Posts
    7
    still not happening can u please make it and send the attachment to me. please..

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    The instructions are simple and explicit. They worked for me. Follow them and it will work for you.

    You have the textbox Click event property set to [Event Procedure] instead of the button. Can use the textbox Click event if you want then the button is not needed.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    Govind is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2012
    Posts
    7
    Still not able to do.. request u to upload the file for me. thank you very much...

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Why not? What happens when you attempt to run the code?

    I'd rather you get it working by your own effort. This was such a simple code adaptation. You already have the general module in place. Make the 2 edits from option 2.

    Remove all the code you have behind the form and replace with the 3 lines I show.

    Click in the textbox and ip address should appear.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    Govind is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2012
    Posts
    7
    thank you very much...its Working now..

  12. #12
    Govind is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Apr 2012
    Posts
    7
    i want to ask one thing...

    When ever i open access database to another new computer is asking for enable editing. can u resolve it.

  13. #13
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Options:

    1. in Access on each computer, click the Office button at upper left corner of Access, Options > Trust Center > Trust Center Settings > Macro Settings > Enable All Macros
    http://office.microsoft.com/en-us/he...010031071.aspx

    2. set the database as trusted http://office.microsoft.com/en-us/ac...010256412.aspx
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 08-22-2013, 12:02 AM
  2. using google maps address into a text field
    By thanosgr in forum Programming
    Replies: 5
    Last Post: 04-26-2012, 03:39 PM
  3. Adding a email address on form
    By akhlaq768 in forum Forms
    Replies: 3
    Last Post: 02-07-2012, 09:11 AM
  4. Replies: 1
    Last Post: 10-07-2009, 08:15 AM
  5. Input Mask for an IP Address and Mack Address
    By baksg1995 in forum Access
    Replies: 18
    Last Post: 06-23-2009, 12:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums