K
Katty
I am using the following code to apply the databinding format for Date
(04/12/2003)
**********************CODE*****************************
Private WithEvents DateBinding As Binding
DateBinding = New Binding("Text", Me.DsReport1, _
"Report.Date")
Me.RichTextBox.DataBindings.Add(DateBinding)
Sub Format(ByVal sender As Object, ByVal e As ConvertEventArgs) Handles _
DateBinding.Format
Dim dt As DateTime = CType(e.Value, DateTime)
e.Value = dt.ToString("dd/MM/yyyy")
End Sub
*********************************************************
It works perfectly but every time I load the form on design mode, the
following messages appear:
"The variable DateBinding is not declared or it was not assigned never"
"The type System.Windows.Forms.Form does not have a field named DateBinding"
Now, this can't be right and I sure don't want to leave it like that but I
can't figure it out.
Any recommendations please?
Thanks!
(04/12/2003)
**********************CODE*****************************
Private WithEvents DateBinding As Binding
DateBinding = New Binding("Text", Me.DsReport1, _
"Report.Date")
Me.RichTextBox.DataBindings.Add(DateBinding)
Sub Format(ByVal sender As Object, ByVal e As ConvertEventArgs) Handles _
DateBinding.Format
Dim dt As DateTime = CType(e.Value, DateTime)
e.Value = dt.ToString("dd/MM/yyyy")
End Sub
*********************************************************
It works perfectly but every time I load the form on design mode, the
following messages appear:
"The variable DateBinding is not declared or it was not assigned never"
"The type System.Windows.Forms.Form does not have a field named DateBinding"
Now, this can't be right and I sure don't want to leave it like that but I
can't figure it out.
Any recommendations please?
Thanks!