Results 1 to 28 of 28

Thread: locked frames

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Location
    somewhere i would rather not be...
    Posts
    76

    locked frames

    i know that i can lock individual items, but when i leave the frame, can i lock that frame and all items inside there, and at the click of a button can i unlock the frame and all contents?

    thanks
    Jeebob

  2. #2
    Lively Member
    Join Date
    Apr 2006
    Location
    Planet Earth
    Posts
    64

    Re: locked frames

    What do u mean by "leave the frame"?
    I'm Still learning!
    satisfied/not satisfied, PLEASE TAKE SOME TIME TO rate me accordingly.
    Ur opinions helps me to be better!


    Appreciation Triggers Another Good Deeds.

  3. #3

  4. #4
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: locked frames

    AFAIK, Frames do not have Locked property. please correct me if i am wrong. dont have VB here.
    Show Appreciation. Rate Posts.

  5. #5
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: locked frames

    Since frames don't have a LostFocus event then I guess to lock it when you leave it youd need to put Frame1.Locked = True in the GotFocus event of all other controls on the form except for the command button where you would say Frame1.Locked = False.

  6. #6
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: locked frames

    Quote Originally Posted by Harsh Gupta
    AFAIK, Frames do not have Locked property. please correct me if i am wrong. dont have VB here.
    You're right. I should have said Enabled instead of Locked.

  7. #7
    Lively Member
    Join Date
    Apr 2006
    Location
    Planet Earth
    Posts
    64

    Re: locked frames

    I think what Martin trying to say is, u set the frame.enabled = false and eureka! the frame is now locked!

    Hope that will help!
    I'm Still learning!
    satisfied/not satisfied, PLEASE TAKE SOME TIME TO rate me accordingly.
    Ur opinions helps me to be better!


    Appreciation Triggers Another Good Deeds.

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Location
    somewhere i would rather not be...
    Posts
    76

    Re: locked frames

    so simply a case of if txtbox.text = "whatever" then frame1.enabled = false.... and that should lock the frame and all contents?
    Jeebob

  9. #9
    Lively Member
    Join Date
    Apr 2006
    Location
    Planet Earth
    Posts
    64

    Re: locked frames

    yes, that's right..but only the objects inside the frame will be locked..that's mean u have to put the text box and other thing inside the frame..
    I'm Still learning!
    satisfied/not satisfied, PLEASE TAKE SOME TIME TO rate me accordingly.
    Ur opinions helps me to be better!


    Appreciation Triggers Another Good Deeds.

  10. #10
    PowerPoster Simply Me's Avatar
    Join Date
    Aug 2003
    Posts
    2,748

    Re: locked frames

    frame has no .locked property. They are right, use .enabled=false property instead. All controls inside the frame will be disabled.
    To give is always to be NOBLE...
    To received is always to be BLESSED....
    Each day strive to be NOBLE
    Each day strive to be BLESSED

    If this post has helped you. Please take time to rate it.

    >=|+|=< Simply Me >=|+|=<

    ----------------------------------------
    Connection Strings | Number Only in Textbox | Splash Screen with Progress Bar | Printing to 1/2 of perforated bond paper |
    Freeze 2005 DataGridView Column

  11. #11

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Location
    somewhere i would rather not be...
    Posts
    76

    Re: locked frames

    i tried to set the frame.locked = false (frame name is fraCustomers) and even though i have done this, it stil doesnt lock now all the objects are located inside the frame, but is there a way i have to link the frame to the objects????
    Jeebob

  12. #12
    Lively Member
    Join Date
    Apr 2006
    Location
    Planet Earth
    Posts
    64

    Re: locked frames

    Quote Originally Posted by Simply Me
    frame has no .locked property. They are right, use .enabled=false property instead. All controls inside the frame will be disabled.
    try

    VB Code:
    1. fraCustomers.enabled = true

    good luck!
    I'm Still learning!
    satisfied/not satisfied, PLEASE TAKE SOME TIME TO rate me accordingly.
    Ur opinions helps me to be better!


    Appreciation Triggers Another Good Deeds.

  13. #13

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Location
    somewhere i would rather not be...
    Posts
    76

    Re: locked frames

    now im overly confused, it stil wont do anything, i have tried fraCustomers.Enabled = False
    fraCustomers.Enabled = True - and neither will lock the frame and contents?????? any clues??????
    Jeebob

  14. #14
    Lively Member
    Join Date
    Apr 2006
    Location
    Planet Earth
    Posts
    64

    Re: locked frames

    sorry..it should be

    VB Code:
    1. fraCustomers.enabled = False


    when u use the above code, u mean u still can write in the textbos and click the buttons inside the frame?

    bcoz, when the frame in disabled (.enabled= false), all the objects inside the frame doesn't appear to be locked but u still can't use the objects inside it i.e. write in the textbox or click the buttons in the frame.
    I'm Still learning!
    satisfied/not satisfied, PLEASE TAKE SOME TIME TO rate me accordingly.
    Ur opinions helps me to be better!


    Appreciation Triggers Another Good Deeds.

  15. #15

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Location
    somewhere i would rather not be...
    Posts
    76

    Re: locked frames

    i no this seems impossible but it stil doesnt do anything

    Private Sub txtOtherContact_LostFocus()
    fraCustomers.Enabled = False
    'fraCustomers.Enabled = True
    End Sub
    and

    Private Sub txtOtherContact_LostFocus()
    'fraCustomers.Enabled = False
    fraCustomers.Enabled = True
    End Sub

    neither way works is there any way i need to link the objects to the frames for it to work because i really dont know why this isnt working
    Jeebob

  16. #16
    Lively Member
    Join Date
    Apr 2006
    Location
    Planet Earth
    Posts
    64

    Re: locked frames

    i tried ur codes and it worked just well..when the txtOtherContact textbox lost it focus (if u click on other objects), the frame will be locked..that's what i've got..
    I'm Still learning!
    satisfied/not satisfied, PLEASE TAKE SOME TIME TO rate me accordingly.
    Ur opinions helps me to be better!


    Appreciation Triggers Another Good Deeds.

  17. #17

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Location
    somewhere i would rather not be...
    Posts
    76

    Re: locked frames

    al send ya the project if ya like see if you can find out anythin thats wrong with it.... becuase its really driving me crazy....
    Jeebob

  18. #18
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: locked frames

    There is no reason to "send" it. Just zip it using Winzip and attach it.

  19. #19
    PowerPoster Simply Me's Avatar
    Join Date
    Aug 2003
    Posts
    2,748

    Re: locked frames

    Are you sure you are using the correct control name?
    To give is always to be NOBLE...
    To received is always to be BLESSED....
    Each day strive to be NOBLE
    Each day strive to be BLESSED

    If this post has helped you. Please take time to rate it.

    >=|+|=< Simply Me >=|+|=<

    ----------------------------------------
    Connection Strings | Number Only in Textbox | Splash Screen with Progress Bar | Printing to 1/2 of perforated bond paper |
    Freeze 2005 DataGridView Column

  20. #20

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Location
    somewhere i would rather not be...
    Posts
    76

    Re: locked frames

    i have only zipped up the form, not attached the tables etc. hopefully you can see what i mean...
    Attached Files Attached Files
    Jeebob

  21. #21
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: locked frames

    The only thing in your Zip file is an Access database.

    Are you doing this in VB6 or Access VBA?

    If it is Access VBA, then that may be way the Frame disabling isn't working.

  22. #22

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Location
    somewhere i would rather not be...
    Posts
    76

    Re: locked frames

    Im using microsoft access 2003, and the coding behind it is done through vb6.0, but its the default that the program opens to edit the code. and if i cant do it through the vb6 coding, how else can this be done? and i will try reposting the full project and see if anyone here can make sense of it.
    Attached Files Attached Files
    Jeebob

  23. #23

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Location
    somewhere i would rather not be...
    Posts
    76

    Re: locked frames

    so does anyone have any clues as to what might be going on becuase im at a loss for an idea. i really dont have a clue whats going on with it.... the laws of programming say that what i have used, should in theory work, but it hasnt... if anyone could help would be extremely grateful!

    Thanks
    Jeebob

  24. #24

  25. #25

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Location
    somewhere i would rather not be...
    Posts
    76

    Re: locked frames

    to access the code:

    right click on an object (for example the text box next to "Event Time")
    open up the properties of the box
    select the "All" Tab
    scroll to "On Change"
    Click the On Change text box
    select "[Event Procedure]"
    just next to that will appear an elipse of three dots, click that and that opens the coding behind the form.
    Jeebob

  26. #26
    Lively Member
    Join Date
    Apr 2006
    Location
    Planet Earth
    Posts
    64

    Re: locked frames

    ive tried ur code and...yes, it doesn't work..i think the frame is different with the frame in vb6..so, i think that u have to lock each item..or see what anybody else have to say!
    I'm Still learning!
    satisfied/not satisfied, PLEASE TAKE SOME TIME TO rate me accordingly.
    Ur opinions helps me to be better!


    Appreciation Triggers Another Good Deeds.

  27. #27

    Thread Starter
    Lively Member
    Join Date
    Oct 2005
    Location
    somewhere i would rather not be...
    Posts
    76

    Re: locked frames

    so might be a case of..... that idea is out the window, does anyone know of any ideas as to how i could possibly link the frames and objects and lock the frame that way, so i could link the frame around the customer details, to the final box in that frame? so when that box loses focus, the frame is then disabled? just becuase i created the frame after the text box, so does this explain why it cannot be disabled?
    Jeebob

  28. #28
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: locked frames

    Quote Originally Posted by MartinLiss
    All you attached was the database. Where is the VB6 code?
    There is no VB6 code. This is an Access VBA project.

    Moved to Office Development.

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