G
Guest
Hi
I am trying to msgbox the field name of a table.
I tried:
Dim strSQL As String
Dim rs As DAO.Recordset
Dim fld As Field
strSQL = "SELECT * FROM [dbo_Item Number List]"
Set rs = CurrentDb.OpenRecordset(strSQL)
For Each fld In rs.Fields
MsgBox fld.Name
Next
But I get a mismatch error on the line of "For Each...."
Is there any other way to get the fields name?
Thanks
I am trying to msgbox the field name of a table.
I tried:
Dim strSQL As String
Dim rs As DAO.Recordset
Dim fld As Field
strSQL = "SELECT * FROM [dbo_Item Number List]"
Set rs = CurrentDb.OpenRecordset(strSQL)
For Each fld In rs.Fields
MsgBox fld.Name
Next
But I get a mismatch error on the line of "For Each...."
Is there any other way to get the fields name?
Thanks