B
Benny
In a db-project (Access 2000) with VBA i've written code to examen
fieldvalues. I get a lot of "Unauthorised use of Null (Error 94)", it is
normal when I examen a field that is empty (has no value in it, what is
normal in a db with - by example telephonenumbers - ie not everyone has a
telefone). Can I turn this errors off in the entire project ?
now I bypass these errors with the following code :
Function fncGetPrefix(strTelNum As String) As String
Dim intStop As Integer
If Not IsNull(strTelNum) Then 'or: If txtPatEmail <>
vbNullString Then
intStop = InStr(1, strTelNum, ".")
fncGetPrefix = Left(strTelNum, intStop - 1)
Else
fncGetPrefix = ""
End If
End Function
a lot of writing for a normal value of "" in a field.
Thanks in advance,
Benny
fieldvalues. I get a lot of "Unauthorised use of Null (Error 94)", it is
normal when I examen a field that is empty (has no value in it, what is
normal in a db with - by example telephonenumbers - ie not everyone has a
telefone). Can I turn this errors off in the entire project ?
now I bypass these errors with the following code :
Function fncGetPrefix(strTelNum As String) As String
Dim intStop As Integer
If Not IsNull(strTelNum) Then 'or: If txtPatEmail <>
vbNullString Then
intStop = InStr(1, strTelNum, ".")
fncGetPrefix = Left(strTelNum, intStop - 1)
Else
fncGetPrefix = ""
End If
End Function
a lot of writing for a normal value of "" in a field.
Thanks in advance,
Benny