VB.NET App: form.close() give error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jamesd0142
    Contributor
    • Sep 2007
    • 471

    VB.NET App: form.close() give error

    My form is called 'PasswordChange '

    i can say:
    [code=vbnet]
    PasswordChange. hide()
    PasswordChange. Show()
    [/code]
    and they work correctly.

    but when i say:
    [code=vbnet]
    PasswordChange. Close()
    [/code]

    i get the error:
    'Property access must assign to the property or use its value.'

    What on earth does this mean?

    ----------------------------------------------------------------------------------------------------
    Also form.close() works on all other forms
    ------------------------------------------------------------

    Cheers
  • nexusbr
    New Member
    • Dec 2007
    • 15

    #2
    try to use this statement instead:


    me.close()

    gl

    Comment

    • kenobewan
      Recognized Expert Specialist
      • Dec 2006
      • 4871

      #3
      Have you ensured that all values have been cleaned up?

      Comment

      • jamesd0142
        Contributor
        • Sep 2007
        • 471

        #4
        Originally posted by kenobewan
        Have you ensured that all values have been cleaned up?
        Could you please explain what you mean by this?

        ----------------------------------------------------------

        hey nexusbr,

        Im trying to close 'passwordchange ' form, from a form called 'access'.

        cheers James

        Comment

        • nexusbr
          New Member
          • Dec 2007
          • 15

          #5
          well..

          have you tried a :
          passwordchange. dispose()
          passwordchange. close()

          ?

          Comment

          • radcaesar
            Recognized Expert Contributor
            • Sep 2006
            • 759

            #6
            Since u have access the form from another form, You have to create a new instance of the form in target form. And then use that instance to close that one.

            Comment

            Working...