|
Public Function GetfilType(Tbname as string,Filname as string) as string
'功能:获得字段类型
Dim rs As New ADODB.Recordset
rs.Open Tbname, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
GetfilType=rs(Filname).Type
End Function
Public Function GetfilType(Tbname as string) as string
'功能:获得字段类型列表,可用做组合框或列表框数据源
Dim rs As New ADODB.Recordset
Dim i as long
rs.Open Tbname, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
for i=0 to rs.fields.count-1
GetfilType=GetfilType & rs(i).name & ";" & rs(i).Type
next
End Function |
|