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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check if field exist?

Status
Not open for further replies.

leangross

IS-IT--Management
Jul 3, 2002
84
PH
I created a crosstab query. I use this to populate something...my problem is how could I check if a field exist in a query. Is there a function that I can use?

 
can creat a user Function and sure reference to DAO just like:

Public Function isFldExt(strFldName As String, strSqlName As String) As Boolean
On Error GoTo Err_isFldExt
Dim rst As DAO.Recordset
Set rst = CurrentDb().OpenRecordset(strSqlName)
isFldExt = (strFldName = rst(strFldName).Name)
Err_isFldExt:
End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top