Results 1 to 5 of 5
  1. #1
    DS928 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Posts
    8

    3085 Error

    I am getting a 3085 Undefined Function ENVIRON in Expression on this bit of code.

    Private Sub Form_Load()
    Dim TU As Boolean
    TU = Nz(DLookup("TerminalTouch", "tblTerminal", "TerminalName = Environ(""ComputerName"")"), 0)


    If TU = True Then
    HidePointer
    Else
    End If
    End Sub

    Using Access 2010 and Windows 7
    Any help is appreciated. Thank you.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Try

    TU = Nz(DLookup("TerminalTouch", "tblTerminal", "TerminalName = '" & Environ("ComputerName") & "'"), 0)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    DS928 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Posts
    8
    Worked! Thank you.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problem, and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    DS928 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Posts
    8
    Thank you for the warm welcome! Have a good day!

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

Similar Threads

  1. Replies: 3
    Last Post: 03-05-2013, 11:17 AM
  2. Replies: 0
    Last Post: 07-16-2012, 05:42 AM
  3. Replies: 2
    Last Post: 06-23-2012, 11:59 PM
  4. Replies: 6
    Last Post: 05-30-2012, 12:32 PM
  5. Replies: 1
    Last Post: 05-11-2012, 10:59 AM

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