Results 1 to 7 of 7

Thread: runtime error 402: in vb 6.0

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    266

    runtime error 402: in vb 6.0

    Im facing a runtime error 402
    Can any 1 plz help me y this error occurs.

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Candon City, Ilocos Sur, Phils.
    Posts
    11,044

    Re: runtime error 402: in vb 6.0

    What is the error description and what exactly are you doing that causes the error?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    266

    Re: runtime error 402: in vb 6.0

    "Code must close topmost modal form first "
    This is the error message im rcving...This error does not occur every time but some times when i use to open a modal form it shows the error and when i close the mesage box application also got closed...plz help me i could not b able t5o trace it out...

  4. #4
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: runtime error 402: in vb 6.0

    see this link http://msdn.microsoft.com/library/de...ottopmodal.asp

    the content is

    Must close or hide topmost modal form first (Error 402)
    Specifics

    The modal form you are trying to close or hide isn't on top of the z-order. This error has the following cause and solution:

    Another modal form is higher in the z-order than the modal form you tried to close or hide.
    First use either the Unload statement or the Hide method on any modal form higher in the z-order. A modal form is a form displayed by the Show method, with the style argument set to 1 vbModal.
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    266

    Re: runtime error 402: in vb 6.0

    thnx ganeesh...
    actually sequence of my application is as follows:
    first I save a record of a student ... before saving the record student's elegibility is checked ... this eligibility is being checked on a modal form...after checking(unloading) of eligibility modal form my record got saved...after saving record on main form then i need to enter some comments...for which i click on a button which opens a modal form...most of the time no error occur on opening of this second modal form but rarely this run time error occurs...

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    266

    Re: runtime error 402: in vb 6.0

    Thnx Ganees ... with ur reply i hav bcome able to trace out the root cause of this problem.. noe I think i could handle it in some appropriate way ... Well thanx alot u have been very helpful to me

  7. #7
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: runtime error 402: in vb 6.0

    noshaba: you are most welcome
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


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