Results 1 to 6 of 6

Thread: object.visible = True/False

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Malaysia
    Posts
    90
    Greetings.

    I have a form with some labels and textboxes. When the form load, I set some label and textboxes to visible = False. It works ok!

    However, when the users click some button, I set soem labels and textboxes visible = False. I also did a refresh but nothing happen. what is my mistake?

    private sub form_load()
    Cmdfind.visible = false
    CmdQuit.visible = True
    end sub

    private sub txtpart_change()
    Cmdfind.visible = True
    cmdQuit.visible = false
    frmfind.refresh
    end sub

    Regards
    CT
    CT

  2. #2
    Guest
    Works fine for me. What exactly do you want to accomplish?

  3. #3
    Member
    Join Date
    Jul 2000
    Location
    LAVAL ( FRANCE )
    Posts
    32

    Unhappy Perhaps...

    Try not refreshing the form... perhaps it initialize it and execute your form_load event... and the buttons go back to their initial state...

    I'm not sure... but you can try...

    COSI

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    The Refresh method just redraws the form. It will not call the Load event again.
    The code works fine for me too, try putting a break point in the txtPart_Change event and see if it's raised or not.
    Maybe you just renamed the TextBox by mistake.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Malaysia
    Posts
    90
    there is a label (lbl1) and a text box (txt1) inside my form. when the form_load event I did the following:

    private sub form_load()
    Lbl1.visible = false
    txt1.visible = false
    frmfind.show
    'lbl1 and txt1 did not show up. this is what i want
    end sub

    private sub cmdfind_click()
    ....
    ....
    if found.... blah blah blah then
    lbl1.visible = true
    txt1.visible = true
    end if
    end sub

    private sub cmdfindNext_click()
    lbl1.visible = false
    txt1.visible = false
    ...
    ....
    'lbl1 and txt1 does not behave as i command
    'they just sit there staring at me?????

    end sub

    CT

  6. #6
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Does the label and textbox appear the right way when you click on cmdFind and don't dissapear when you click on cmdFindNext?

    If that is the case please post all the code you have in the cmdFindNext_Click routine so we can have a look at it.

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