S
Slonocode
I have some textboxes bound to an access db. I wanted to format the
textboxes that displayed currency and date info so I did the following:
Dim WithEvents oBidAmt As Binding
oBidAmt = New Binding("Text", Me.Ds1, "Items.BidAmt")
txtBidAmt.DataBindings.Add(oBidAmt)
Private Sub oBidAmt_Format(ByVal sender As Object, ByVal e As
System.Windows.Forms.ConvertEventArgs) Handles oBidAmt.Format
e.Value = Format(e.Value, "c")
End Sub
Private Sub oBidAmt_Parse(ByVal sender As Object, ByVal e As
System.Windows.Forms.ConvertEventArgs) Handles oBidAmt.Parse
e.Value = Format(e.Value, "D")
End Sub
I am unable to edit the textboxes that are currency formatted. I am able to
edit the textboxes that are date formatted.
When I type a new amount into a textbox with currency formatting it reverts
back to the old amount as soon as I leave the textbox.
The date types do however work as expected.
Any ideas?
Slonocode
textboxes that displayed currency and date info so I did the following:
Dim WithEvents oBidAmt As Binding
oBidAmt = New Binding("Text", Me.Ds1, "Items.BidAmt")
txtBidAmt.DataBindings.Add(oBidAmt)
Private Sub oBidAmt_Format(ByVal sender As Object, ByVal e As
System.Windows.Forms.ConvertEventArgs) Handles oBidAmt.Format
e.Value = Format(e.Value, "c")
End Sub
Private Sub oBidAmt_Parse(ByVal sender As Object, ByVal e As
System.Windows.Forms.ConvertEventArgs) Handles oBidAmt.Parse
e.Value = Format(e.Value, "D")
End Sub
I am unable to edit the textboxes that are currency formatted. I am able to
edit the textboxes that are date formatted.
When I type a new amount into a textbox with currency formatting it reverts
back to the old amount as soon as I leave the textbox.
The date types do however work as expected.
Any ideas?
Slonocode