StrFieldName = CurrentDb.TableDefs("tblEmployee").Fields(intCounter).Name IntNumberofFields = CurrentDb.TableDefs("tblEmployee").Fields.Countįor intCounter = 0 To intNumberofFields - 1 Dim intNumberofFields As Integer, intFieldType As Integer, strTypeName As Stringĭim fld As Field, intCounter As Integer, strFieldName As String.The important point here is that the Type Property of a Field Object returns a Numeric Value indicating its Data Type. You can adapt it to your own specifc needs, but if you further help just ask. Ideally, this could be refined and contained within a Function/Sub Procedure. The synonyms are identified in Microsoft Access Database Engine SQL Reserved Words. The following table lists the primary data types. Here is a little Routine that will number all the Fields in a Table, list their Name, and if it is Numeric, list the Data Type. The Microsoft Access database engine SQL data types consist of 13 primary data types defined by the Microsoft Jet database engine and several valid synonyms recognized for these data types.
The SQL statement created produces something along the lines ofĭoesnot work, i need to remove the ' for this datatypeĮxcuse the babble, i think i have re-explained myself at least twice over. The reason I wish to do this is, because I am creating a query in VBA and in the Where clause I use IN, and it is giving me a datatype mismatch whenever it is sent a Number data type. Me!lstQuer圜riteria.Datatype, but my results turned up no dice. Any ideas, i thought there would be something along the lines of I have a list which is populated with Fields from a table, I want to be able to determine if the data type of the value selected in the list is Number.