I have an access application that I allow users to import data and match it up with data in the application based on a unique identifier. I'm building a dynamic filter that will allow users to pick which table column to pick then to enter a criteria to use for the filter. So what I'm looking for is a way to populate an Access form combo box from an Access table with two criteria: 1) one combo box can not be date types, 2) one combo box needs to only display date types (so a valid date range can be used).
I've googled a few days and haven't quite found what I'm looking for.
This seems to be able to identify types in a table: http://bytes.com/topic/access/answers/601180-find-field-data-type-vba
This seems to be able to identify the names of a column:
Set db = CurrentDb()
Set rs1 = db.OpenRecordset("Table1")
Dim fld As DAO.Field
For Each fld In rs1.Fields
Set fld = Nothing
If needed, when the page opens it could create a table then i could create queries to record the column name and the column type then the combo boxes could then just have a query for the column types. There might be a more dynamic or elegant way to do this, but I'm not finding any examples that might show how to create a table of column names.