Hi,
I'm also trying to make a changelog.. I have a piece of code that checks if a control on a form is a textfield or a memofield.. I'm using this code for it but the MyCtrl.ControlType results in a numeric value everytime so the statement is False everytime.. Does anyone know why this doesn't work and how I have to check for a memo field..?
Thanks in advance...
Here's the code
'Piece of Michael Red 8/1/2002 Transaction log for Ms. Access BOUND forms.
For Each MyCtrl In Frm.Controls
If (basActiveCtrl(MyCtrl)) Then 'Consider replacing w/ test for "ControlSource"
If ((MyCtrl.Value <> MyCtrl.OldValue) _
Or (IsNull(MyCtrl) And Not IsNull(MyCtrl.OldValue)) _
Or (Not IsNull(MyCtrl) And IsNull(MyCtrl.OldValue))) Then
If (MyCtrl.ControlType = dbMemo) Then
Hist = "tblHistMemo"
Else
Hist = "tblHist"
End If
Debug.Print Hist
Call basAddHist(Hist, Frm.Name, MyKey.Name, MyCtrl)
End If
End If
Next MyCtrl
I'm also trying to make a changelog.. I have a piece of code that checks if a control on a form is a textfield or a memofield.. I'm using this code for it but the MyCtrl.ControlType results in a numeric value everytime so the statement is False everytime.. Does anyone know why this doesn't work and how I have to check for a memo field..?
Thanks in advance...
Here's the code
'Piece of Michael Red 8/1/2002 Transaction log for Ms. Access BOUND forms.
For Each MyCtrl In Frm.Controls
If (basActiveCtrl(MyCtrl)) Then 'Consider replacing w/ test for "ControlSource"
If ((MyCtrl.Value <> MyCtrl.OldValue) _
Or (IsNull(MyCtrl) And Not IsNull(MyCtrl.OldValue)) _
Or (Not IsNull(MyCtrl) And IsNull(MyCtrl.OldValue))) Then
If (MyCtrl.ControlType = dbMemo) Then
Hist = "tblHistMemo"
Else
Hist = "tblHist"
End If
Debug.Print Hist
Call basAddHist(Hist, Frm.Name, MyKey.Name, MyCtrl)
End If
End If
Next MyCtrl