Here is a thread that should provide some clues:
https://stackoverflow.com/questions/...-in-vba-access
As for the requested function to provide data types names here is one version from Orange (Jack) on this forum, sorry Jack, hope it's OK:
Code:
'--------------------------------------------------------------------------------------------------------------' Procedure : FieldType
' Author 1 : Jack
' Created : 03/18/2021
' Modified : 03/23/2021
' Purpose : To identify fieldtypes in Access
'--------------------------------------------------------------------------------------------------------------
Private Function FieldType(v_fldtype As Integer) As String
On Error GoTo Error_FieldType
Select Case v_fldtype
Case dbDecimal
FieldType = "Decimal"
Case dbSingle
FieldType = "Single"
Case dbAttachment
FieldType = "Attachment"
Case dbBigInt
FieldType = "BigInteger"
Case dbBoolean
FieldType = "Boolean"
Case dbByte
FieldType = "Byte"
Case dbInteger
FieldType = "Integer"
Case dbLong
FieldType = "Long"
Case dbCurrency
FieldType = "Currency"
Case dbSingle
FieldType = "Single"
Case dbDouble
FieldType = "Double"
Case dbDate
FieldType = "Date"
Case dbText
FieldType = "Text"
Case dbLongBinary
FieldType = "LongBinary"
Case dbMemo
FieldType = "Memo"
Case dbGUID
FieldType = "GUID"
Case Else
FieldType = "??Needs definition" 'Not all field types may have been defined
End Select
Exit_Error_Fieldtype:
Exit Function
Error_FieldType:
MsgBox Err.Number & ": " & Err.Description
Resume Exit_Error_Fieldtype
End Function
Cheers,