Results 1 to 11 of 11
  1. #1
    ineedaccesshelp is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    17

    Trouble with Disappearing Boxes

    I have created a form that upon the clicking of a check box, it makes text boxes disappear. However, if you click the check box, it keeps the settings from the previous record (no words in the the text boxes, but the text boxes are still present and the check box still checked like the previous record). How do I make the setting reset every time I open a new record?



    Was going to post a sample database to give you an idea of what I am dealing with but for some reason the file size is too big. Let me know how I can shrink the file size as well. I have deleted all the records I can from the database. Direction for if I do get it up are posted below. Thanks for the help!







    See my my Database attached and look at my form, RBs Form (ignore the other forms for now). If you check playoff team and start scrolling through the records, you'll see what I am talking about.

    Let me know if you have any additional questions and thank you for your help!

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Typically you'd have similar code in the form's current event to handle the changing of records. If you still need to post the db, normally doing a compact/repair and then zipping will make it small enough.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ineedaccesshelp is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    17
    Thanks for the advice. Here's my sample. Again see directions above.

    Practice Database 2.mdb

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Did you try the current event as recommended? This may help:

    http://www.baldyweb.com/ConditionalVisibility.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    ineedaccesshelp is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    17
    It looks like your controls would accomplish the same thing as mine. Using the example I gave you, how would I input the code?

  6. #6
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I don't know how to say it any differently. You need the same code in the form's current event ("On Current").
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    ineedaccesshelp is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    17
    Where do I find this "On Current"/current event space under the properties? Also, I was just seeing if you could try your code out on my db I sent you. Just so you know the code I have been using for the event procedure in my db is:

    Private Sub Playoff_Team_AfterUpdate()

    If (Playoff_Team = True) Then
    Bonus.Enabled = True
    Bonus.Locked = False
    Bonus.Visible = True

    Else
    Bonus.Enabled = False
    Bonus.Locked = True
    Bonus.Visible = False

    End If
    End Sub


    Any way to alter this to accomplish my goal?

  8. #8
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    See attached.

    Click image for larger version. 

Name:	Current.jpg 
Views:	4 
Size:	199.0 KB 
ID:	10149
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    ineedaccesshelp is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    17
    Got it! It took me a second to realize I had to leave the AfterUpdate entry as well, but the OnCurrent did the trick! Now, I need to present one more variable. I have to do it for multiple boxes on severals tabs on the same form that are pulling information from one database. Do I need to put an "End If" at the end of each sequence and then an "End Sub" at the very end or do I need do it another way? Thank you for your patience and help!

  10. #10
    ineedaccesshelp is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    17
    Looks like I got it figured out! Thanks for your help!

  11. #11
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problem, glad you got it sorted out.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Cascading Combo Boxes trouble
    By Monterey_Manzer in forum Access
    Replies: 4
    Last Post: 09-13-2012, 11:06 AM
  2. disappearing combo box value
    By j6sander in forum Forms
    Replies: 5
    Last Post: 09-11-2012, 10:22 AM
  3. Disappearing checks in check boxes
    By jimmonator in forum Forms
    Replies: 3
    Last Post: 07-21-2011, 02:57 PM
  4. The amazing disappearing VBA code
    By Michele Keck in forum Forms
    Replies: 2
    Last Post: 10-01-2010, 11:44 AM
  5. Stoping Times disappearing
    By AJH1984 in forum Access
    Replies: 10
    Last Post: 06-19-2009, 05:46 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
  •  
Other Forums: Microsoft Office Forums