Howdy!
I am constantly validiting data values in my code. Long ago, I wrote a function (below) which received the table, column, value and data type. It returns a boolean if the data does/does not exist. Works fine. However, I have never liked the fact I am passing the data type as a string ("int", "Date", etc). I am going to replace it with a type code (1 = "int", 2 = "date", etc.). Now, I could just make up my own, but I was wondering if there was a standard used in other functions, data definitions, etc. I seem to remember seeing this before, but cannot remember where. I know this is a trivial matter, but I am making a concerted effort to standardize my work.
Thanks
Public Function VerifyDataValue(strTable As String, strColumn As String, varValue As Variant, strType As String) As Boolean
I am constantly validiting data values in my code. Long ago, I wrote a function (below) which received the table, column, value and data type. It returns a boolean if the data does/does not exist. Works fine. However, I have never liked the fact I am passing the data type as a string ("int", "Date", etc). I am going to replace it with a type code (1 = "int", 2 = "date", etc.). Now, I could just make up my own, but I was wondering if there was a standard used in other functions, data definitions, etc. I seem to remember seeing this before, but cannot remember where. I know this is a trivial matter, but I am making a concerted effort to standardize my work.
Thanks
Public Function VerifyDataValue(strTable As String, strColumn As String, varValue As Variant, strType As String) As Boolean