T
taco
Hi everyone;
Thanks in advance for your help. This time the problem is like this. There
are two text box named "DClassLei" and "DClass" with "euro" format and 2
decimal places. Both of them are getting their value by a vb code regarding
different text box's values. There is another text box named "ticket" and
should get it's value as (DClassLei+DClass)/25. I wrote the code below but
first thing is, if only "DClassLei" or "DClass" has value "ticket" is not
getting it's value as 2 decimal places and if both "DClassLei" and "DClass"
have values, code is ending with type mismatch error.
Here is my unsuccessful code;
Private Sub DClass_LostFocus()
Dim dcl1 As String
Dim dcl2 As String
Dim tic As String
dcl1 = Me!DClassLei
dcl2 = Me!DClass
tic = (dcl1 + dcl2) / 25
Me!Ticket.SetFocus
Me!Ticket = tic
Me!New.SetFocus
End Sub
Thanks in advance for your help. This time the problem is like this. There
are two text box named "DClassLei" and "DClass" with "euro" format and 2
decimal places. Both of them are getting their value by a vb code regarding
different text box's values. There is another text box named "ticket" and
should get it's value as (DClassLei+DClass)/25. I wrote the code below but
first thing is, if only "DClassLei" or "DClass" has value "ticket" is not
getting it's value as 2 decimal places and if both "DClassLei" and "DClass"
have values, code is ending with type mismatch error.
Here is my unsuccessful code;
Private Sub DClass_LostFocus()
Dim dcl1 As String
Dim dcl2 As String
Dim tic As String
dcl1 = Me!DClassLei
dcl2 = Me!DClass
tic = (dcl1 + dcl2) / 25
Me!Ticket.SetFocus
Me!Ticket = tic
Me!New.SetFocus
End Sub