'************************************************************************************ Function ct_CheckDate(ByVal dateFld) 'Verilen tarihin geçerli bir tarih olup olmadığını kontrol eder 'İşlem başarılı sonuçlanmışsa True, aksi takdirde False döndürür. '--Erkin, 02.02.2001 On Error Resume Next Dim y y = FormatDateTime(dateFld, vbShortDate) If Err <> 0 Then ct_CheckDate = False Else ct_CheckDate = IsDate(dateFld) End If End Function '************************************************************************************ Function ct_FormatMyDate(x) If IsDate(x) Then ct_FormatMyDate = FormatDateTime(x, vbShortDate) ct_FormatMyDate = Replace(ct_FormatMyDate,".","/") Else ct_FormatMyDate = FormatDateTime(Date(),vbShortDate) ct_FormatMyDate = Replace(ct_FormatMyDate,".","/") End If End Function '************************************************************************************ Function ct_CheckNumeric(ByVal numFld) 'Verilen sayının geçerli bir sayı olup olmadığını kontrol eder 'İşlem başarılı sonuçlanmışsa True, aksi takdirde False döndürür. '--Erkin, 21.03.2001 On Error Resume Next Dim y y = FormatNumber(numFld) If Err <> 0 Then ct_CheckNumeric = False Else ct_CheckNumeric = IsNumeric(numFld) End If End Function '************************************************************************************ Function ct_FormatMyNumber(x) If x <> "" Then ct_FormatMyNumber = FormatNumber(x) Else ct_FormatMyNumber = "" End If End Function '************************************************************************************ Function ct_CheckInteger(ByVal numFld) 'Verilen sayının geçerli bir tamsayı olup olmadığını kontrol eder 'İşlem başarılı sonuçlanmışsa True, aksi takdirde False döndürür. '--Erkin, 21.03.2001 On Error Resume Next Dim y y = FormatNumber(numFld) If Err <> 0 Then ct_CheckInteger = False Else If Not IsNumeric(numFld) Then ct_CheckInteger = False Else ct_CheckInteger = ( CStr(Fix(numFld)) = CStr( FormatNumber(numFld, 0, 0, 0) ) ) End If End If End Function '************************************************************************************ Function ct_FormatMyInteger(x) If x <> "" Then ct_FormatMyInteger = FormatNumber(x, 0) Else ct_FormatMyInteger = "" End If End Function '************************************************************************************ Function ct_CheckCurrency(ByVal curFld) 'Verilen parasal sayının geçerli bir sayı olup olmadığını kontrol eder. 'İşlem başarılı sonuçlanmışsa True, aksi takdirde False döndürür. '--Erkin, 21.03.2001 On Error Resume Next Dim y y = CCur(curFld) If Err <> 0 Then ct_CheckCurrency = False Else ct_CheckCurrency = IsNumeric(y) End If End Function '************************************************************************************ Function ct_FormatMyCurrency(x) If x <> "" Then ct_FormatMyCurrency = FormatCurrency(CCur(x)) Else ct_FormatMyCurrency = "" End If End Function '************************************************************************************