MartyConnelly
martyconnelly at shaw.ca
Tue Jun 14 14:54:58 CDT 2005
You can try Win32_NetworkAdapter and Win32_NetworkAdapterConfiguration to get information about the network adapter. Also, you can obtain the information about what kind of connection (such as VPN, PPPoE..etc) is using in the remote PC from these two classes. You can have both wireless and lan connection made at same time. but you can set opening precedence from Network Control Panel advanced options. This code might tell you if wireless or Lan connection, haven't got wireless one to test. You can code to disable one of the Nics via Shell namespace. also this DOS command might tell you something netsh interface show interface > c:\temp\netsh.txt Sub testnics() 'this code takes several seconds to run initially Dim NICA As Object Dim Nic As Variant Dim lngCount As Long Dim StrNic As String Dim StrIP As String Dim i As Long Set NICA = GetObject("winmgmts:").InstancesOf("Win32_NetworkAdapterConfiguration") For Each Nic In NICA Debug.Print "============================" StrNic = Nic.Description 'type of NIC Debug.Print StrNic If Nic.IPEnabled Then lngCount = UBound(Nic.IPAddress) 'For i = 0 To lngCount StrIP = vbTab & Nic.IPAddress(0) 'array If StrIP <> "" Then Debug.Print "IP " & StrIP & " MAC address " & Nic.MACAddress Debug.Print "DNS Name " & Nic.DNSHostName End If ' Next End If Debug.Print vbNewLine Next Robert Gracie wrote: >Michael, > The problem is a little deeper that that. We have several laptop users, >each with wireless capabilities that automatically connect to the LAN. I >have instructed them, (sigh) time and time again, that they must plug into >the network, via a LAN jack before logging in the program. I'm at the point >now where I need to come up with a solution that works to prevent a wireless >connection to this one program. All laptop users are running Win XP. > >I sure hope there is a "Coded" solution, as I don't want to convert this >program to SQL.... > >I hope this helps... > >Robert > > > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Michael R Mattys >Sent: Monday, June 13, 2005 8:16 PM >To: Access Developers discussion and problem solving >Subject: Re: [AccessD] Detecting Database Connection Type? > >----- Original Message ----- >From: "Robert Gracie" <Robert at servicexp.com> >To: "'Access Developers discussion and problem solving'" ><accessd at databaseadvisors.com> >Sent: Monday, June 13, 2005 7:56 PM >Subject: [AccessD] Detecting Database Connection Type? > > > > >> How can one check the type of connection to the back end data, making >> >> >sure > > >>the connection is not wireless? >> >> > >Robert, > >What prompted your question? >Is it not simply a matter of connection exists verus connection does not >exist? > >---- > >Michael R. Mattys >Mattys MapLib for Microsoft MapPoint >http://www.mattysconsulting.com > >-- >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com > > > -- Marty Connelly Victoria, B.C. Canada