Public Sub Test()
Dim TableName As String
Dim FieldName As String
Dim Id As Long
TableName = "MsysObjects"
FieldName = "Name"
Id = -2147483646
Debug.Print DLookup(FieldName, TableName, "Id=" & Id)
FieldName = "DateCreate"
Debug.Print DLookup(FieldName, TableName, "Id=" & Id)
End Sub
|