Dim cnn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim strSQL As String
Set cnn = CurrentProject.Connection
Set rs = New ADODB.Recordset
strSQL = "MyTable"
Dim i As Integer
rs.Open strSQL, cnn, adOpenForwardOnly, adLockReadOnly
For i = 0 To rs.Fields.Count - 1
MsgBox rs.Fields(i).Name
Next
rs.Close
cnn.Close
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
:
| Can you provide code to make a list of the fields within a table?
|
|