after update in a text box

  • Thread starter Thread starter Esperanza
  • Start date Start date
E

Esperanza

Hello VBA Expert,

I have a textbox where the user has to enter an amount,
after the update, I want to calculate our so many canadian taxes and then
set the focus to the
discount text box.

Problem : after doing enter,
the amount disapear in the text box and the focus is not set the the
discount text box.
we have to use the mouse and then suddenly the amout enter by the user
appears in the text box.

Thanks in advance for your help.

Experanza



'===================================================================
Me.txtEscompte = 0
Me.txtMontant = Me.txtBrut

If [Forms]![frmClientsEtAgences]![TAXE] = "TPS/TVQ" Or
[Forms]![frmClientsEtAgences]![TAXE] = "TPS" Then
Me.TPS = ArrondiReel(Me.txtBrut * 0.07, 2)
End If

If [Forms]![frmClientsEtAgences]![TAXE] = "TPS/TVQ" Then
Me.TVQ = ArrondiReel((Me.txtMontant + Me.TPS) * 0.075, 2)
End If

Me.txtTotalParParution = Me.txtMontant + Me.TPS + Me.TVQ

Me.txtEscompte.SetFocus
 
Yes, It is bounded,
Esperanza

is your textbox bounded or unbound?? if it's unbound maybe
that's the problem...
-----Original Message-----

Hello VBA Expert,

I have a textbox where the user has to enter an amount,
after the update, I want to calculate our so many canadian taxes and then
set the focus to the
discount text box.

Problem : after doing enter,
the amount disapear in the text box and the focus is not set the the
discount text box.
we have to use the mouse and then suddenly the amout enter by the user
appears in the text box.

Thanks in advance for your help.

Experanza



'========================================================= ==========
Me.txtEscompte = 0
Me.txtMontant = Me.txtBrut

If [Forms]![frmClientsEtAgences]![TAXE] = "TPS/TVQ" Or
[Forms]![frmClientsEtAgences]![TAXE] = "TPS" Then
Me.TPS = ArrondiReel(Me.txtBrut * 0.07, 2)
End If

If [Forms]![frmClientsEtAgences]![TAXE] = "TPS/TVQ" Then
Me.TVQ = ArrondiReel((Me.txtMontant + Me.TPS) * 0.075, 2)
End If

Me.txtTotalParParution = Me.txtMontant + Me.TPS + Me.TVQ

Me.txtEscompte.SetFocus


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top