Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Fields in a View

Status
Not open for further replies.

DeanWilliams

Programmer
Feb 26, 2003
236
GB
Hi,

Is there any way to access the fields in a view in an Access project? What I mean is, is there an equivalent of DAO QueryDefs for Views? I want to enumerate and change the field names specified for a view in code.

The AccessObjects in the AllViews collection doesn't allow access to the fields.

Any help would be great.

Thanks in advance.

Dean :)
 
That should be done in conjunction with the DBA on the sql server side. Either through Query Analyzer or Enterprise Manager. I suppose you could do it through DDL statements but that seems cumbersome and probably unnecessary, but the DBA would need to grant permissions for this.
 
strSQL = "SELECT * FROM MyTable "
CurrentProject.Connection.Execute "ALTER VIEW MyView AS " & strSQL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top