Hi,
I have linked my access front-end to an SQL server. Now I have linked to a view and want to list all field names in the view.
I use this code:
Set tblView = CurrentDb.TableDefs(strView)
For Each fldName In tblView.Fields <-- gives error 3420
Me.kzlFieldNames.AddItem fldName.Name
Next fldName
The error invalid object does not occur on the set tblView line so the table is linked correctly.
I can open the view without problem so the link is correct.
Any ideas?
Thanks.
I have linked my access front-end to an SQL server. Now I have linked to a view and want to list all field names in the view.
I use this code:
Set tblView = CurrentDb.TableDefs(strView)
For Each fldName In tblView.Fields <-- gives error 3420
Me.kzlFieldNames.AddItem fldName.Name
Next fldName
The error invalid object does not occur on the set tblView line so the table is linked correctly.
I can open the view without problem so the link is correct.
Any ideas?
Thanks.