Microsoft
Software
Hardware
Network
Question : How to determine if a user is logged in through Citrix
I deploy Access 2003 applications that have been packaged using Microsoft Access 2003 developer extensions. One of these applications needs to run different startup code if the user is logged in through Citrix. Currently I am determining whether the user is logged in through Citrix using the code shown below. Basically it reads through the environ variables and loads them into a table. It then queries the table to see if there is a variable containing "CLIENTNAME". If there is, then the user is logged in through Citrix.
This code does the job but I was just wondering if anyone knows of a more "elegant" way of determing if the user is logged in through Citrix using VBA.
Dim EnvString As String
Dim rs As DAO.Recordset
Dim Indx As Long
DoCmd.OpenQuery "Clear Environ Variables"
Indx = 1
Set rs = CurrentDb.OpenRecordset("E
nviron Variables")
Do
EnvString = Environ(Indx)
If Len(Trim(EnvString)) > 250 Then
rs.AddNew
rs!variablename = Left(EnvString, 250)
rs.update
Else
rs.AddNew
rs!variablename = EnvString
rs.update
End If
Indx = Indx + 1
Loop Until EnvString = ""
rs.Close
If DCount("*", "Check for CLIENTNAME") > 0 Then
CitrixYN = "Y"
Else
CitrixYN = "N"
End If
Answer : How to determine if a user is logged in through Citrix
I was looking for something other than using the Environ variables to determine if user was logged on through Citrix. I guess I'll assume it's the only way.
Random Solutions
How do i use DOS/Run to attach a file and email using mailto: ?
CWA 401.2 Error
Create email is a users Exchange 2010 maibox
Do I have to use 192.168.x.x for SBS2008
Importing Text files into Access VBA
How to Export Access Query with 100k+ records to Excel in separate tabs?
Mapping drives via script, setting the drives and subfolders for Offline Availability & clearing current Oflline Files Cache
Append csv text to table
Using Stored Procedure
Error Calling Stored Proc