Public Sub InicialRec()
Dim TableRec As ADODB.Recordset
Dim strCurrentConn As String
Set TableRec = New ADODB.Recordset
Dim i As Variant
strCurrentConn = CurrentProject.Connection
TableRec.Open "ТипаТаблица", strCurrentConn, adOpenStatic, adLockOptimistic
With TableRec
.MoveLast
i=.Fields("ТипаПоле")
End With
TableRec.Close
Set TableRec = Nothing
MsgBox i
End Sub
|