MastercafeCTV
mastercafe at ctv.es
Mon Jan 5 00:36:46 CST 2004
Hi group we are trying to take all reports from another MDB, we use the next
code to see our Reports/Tables/Forms, but how to change
Application.CurrentProject for c:\MyApp\Sample.MDB??
Function CtlLista(TIPO As String)
On Error GoTo ctlerror
Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentProject
Dim I As Integer
Dim frm As Form
Dim valores As String
valores = ""
Select Case TIPO
Case "F"
For Each obj In dbs.AllForms
If valores = "" Then
valores = valores & obj.Name
Else
valores = valores & ";" & obj.Name
End If
Next obj
Case "R"
For Each obj In dbs.AllReports
If valores = "" Then
valores = valores & obj.Name
Else
valores = valores & ";" & obj.Name
End If
Next obj
Case "T"
For Each obj In dbs.AllTables
If valores = "" Then
valores = valores & obj.Name
Else
valores = valores & ";" & obj.Name
End If
Next obj
Etc...........
Thanks
Juan Menendez
===========================================
MASTERCAFE SL - NIF B-82.617.614
www.mastercafe.com
Deleg. Asturias
Tel 985.88.49.44 / 627.531.764
Fax 627.500.205
info at mastercafe.com
juan at mastercafe.com
Deleg. Madrid
Tel 627.474.285
cecilia at mastercafe.com
===========================================
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of MastercafeCTV
Sent: lunes, 05 de enero de 2004 7:09
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Mac address
We check this function and can't obtain any serial from the mainboard. The
AXP check ok for compiling but return only " ," (two character)
Do you know why??
We use the serial HDD control to check the computer, and with this code
Set fs = CreateObject("Scripting.filesystemobject")
Set d = fs.getdrive(fs.getdrivename(fs.getabsolutepathname("C:")))
HDD = d.SerialNumber
The lenght can be 6 or more characters
Juan Menendez
Mastercafe
===========================================
MASTERCAFE SL - NIF B-82.617.614
www.mastercafe.com
Deleg. Asturias
Tel 985.88.49.44 / 627.531.764
Fax 627.500.205
info at mastercafe.com
juan at mastercafe.com
Deleg. Madrid
Tel 627.474.285
cecilia at mastercafe.com ===========================================
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
Sent: lunes, 05 de enero de 2004 1:40
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Mac address
On 4 Jan 2004 at 17:43, John Bartow wrote:
> I was just wondering why the Main Circuit Board Serial Number isn't
> used for this. It would seem to me that this would be about the most
> stable unique ID number in a PC. I have no idea how you would read
> this number but it always shows up in my hardware asset inventories.
>
> Any comments?
Public Function MBSerialNumber() As String
'RETRIEVES SERIAL NUMBER OF MOTHERBOARD
'IF THERE IS MORE THAN ONE MOTHERBOARD, THE SERIAL
'NUMBERS WILL BE DELIMITED BY COMMAS
'YOU MUST HAVE WMI INSTALLED AND A REFERENCE TO
'Microsoft WMI Scripting Library IS REQUIRED
Dim objs As Object
Dim obj As Object
Dim WMI As Object
Dim sAns As String
Set WMI = GetObject("WinMgmts:")
Set objs = WMI.InstancesOf("Win32_BaseBoard")
For Each obj In objs
sAns = sAns & obj.SerialNumber
If sAns < objs.Count Then sAns = sAns & ","
Next
MBSerialNumber = sAns
End Function
--
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com