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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.