Results 1 to 16 of 16

Thread: Little programming help

Threaded View

  1. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2001
    Posts
    296
    thank beachbum, Sorry i made a mistake on Copy and paste on this forum It should be this way that cause me error

    VB Code:
    1. 'This is in the Module.
    2. Public Sub EMptyWS(FormName As Form, Cancel As Boolean)
    3. If Len(FormName.txtSumInsured.Text) = 0 Then
    4. MsgBox "Please enter a Sum Insured amount first", vbExclamation, "Wind Screen"
    5. Else
    6. FormName.txtWs.Text = CDbl(FormName.txtperWs.Text) * CDbl(FormName.txtSumInsured.Text) / 100
    7. Cancel = True 'this is to setfocus on mskNCD textbox until  
    8. 'Len(FormName.txtSumInsured.Text)  > 0
    9. 'But i would like to set focus txtSumInsured  until the condition is  Len(FormName.txtSumInsured.Text)  > 0.
    10. 'How? if i choose to set txtSumInsured.Setfocus the cursor would not be there But another textbox
    11. 'where i click on another textbox
    12. End If
    13. End Sub
    14.  
    15. 'This is in the Form
    16. Private Sub mskNCD_Validate(Cancel As Boolean)
    17. EMptyWs FrmPoliCreate ' Arugement Not Optional ???
    18. End Sub
    Last edited by CutePretty; Jan 6th, 2002 at 03:23 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width